fix(gitops/sources): fix the handling of the newer structure BE-12919 (#2931)

This commit is contained in:
andres-portainer
2026-06-17 09:08:30 -03:00
committed by GitHub
parent 98bd985142
commit 0ba6bc6a01
7 changed files with 48 additions and 15 deletions
@@ -69,12 +69,10 @@ func TestBuildConnectionInfo(t *testing.T) {
assert.Equal(t, connectionInfo{}, buildConnectionInfo(nil))
cfg := &gittypes.RepoConfig{
ConfigFilePath: "docker-compose.yml",
TLSSkipVerify: true,
Authentication: &gittypes.GitAuthentication{Username: "user"},
}
got := buildConnectionInfo(cfg)
assert.Equal(t, "docker-compose.yml", got.ConfigFilePath)
assert.True(t, got.TLSSkipVerify)
require.NotNil(t, got.Authentication)
assert.Equal(t, "user", got.Authentication.Username)