diff options
Diffstat (limited to 'internal/service/service_test.go')
-rw-r--r-- | internal/service/service_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/internal/service/service_test.go b/internal/service/service_test.go new file mode 100644 index 0000000..b73a753 --- /dev/null +++ b/internal/service/service_test.go @@ -0,0 +1,26 @@ +package service + +import ( + "os" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestService_Mirror(t *testing.T) { + cfgPath := os.Getenv("INTEGRATION_TEST_CONFIG") + if cfgPath == "" { + t.Skip("set INTEGRATION_TEST_CONFIG to run this test") + } + + cfg, err := ReadConfig(cfgPath) + require.NoError(t, err, cfgPath) + + srv, err := NewService(cfg) + require.NoError(t, err, "creating service") + + for _, mirror := range srv.cfg.Mirrors { + err = srv.Mirror(mirror) + require.NoError(t, err) + } +} |