diff options
| author | Slack Coder <slackcoder@server.ky> | 2025-04-21 16:45:39 -0500 |
|---|---|---|
| committer | Slack Coder <slackcoder@server.ky> | 2025-04-22 15:27:36 -0500 |
| commit | d75e17a48934e4896963fb0fee78dbd53f4e780b (patch) | |
| tree | 27a4fd16640846df846d36d2fc5b898189b68620 /internal/service/service_test.go | |
| parent | e7dd47e8b683a51851883bf2918086963676d7cd (diff) | |
| download | mirror-0.0.3.tar.xz (sig) | |
Implement staging and verificationv0.0.3
Ensure data integrity by supporting data staging and verification.
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) + } +} |
