mirror of
https://tvoygit.ru/Djam/artmigrator.git
synced 2025-02-23 18:32:46 +00:00
19 lines
No EOL
565 B
Go
19 lines
No EOL
565 B
Go
package config
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestLoadConfig(t *testing.T) {
|
|
configFile := "../tests/config.yaml"
|
|
cfg, err := LoadConfig(configFile)
|
|
assert.NoError(t, err)
|
|
assert.NotNil(t, cfg)
|
|
assert.Equal(t, "https://nexus.example.com", cfg.Nexus.URL)
|
|
assert.Equal(t, "your-nexus-username", cfg.Nexus.Username)
|
|
assert.Equal(t, "your-nexus-password", cfg.Nexus.Password)
|
|
assert.Equal(t, "https://gitea.example.com", cfg.Gitea.URL)
|
|
assert.Equal(t, "your-gitea-token", cfg.Gitea.Token)
|
|
} |