Skip to content

Commit

Permalink
FIx Nuget & DotNet tests (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea authored Nov 21, 2024
1 parent 9fb4156 commit 04daeb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion artifactory/commands/dotnet/dotnetcommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import (
)

const (
SourceName = "JFrogArtifactory"
// SourceName should match the one in the config file template.
SourceName = "JFrogCli"
configFilePattern = "jfrog.cli.nuget."

dotnetTestError = `the command failed with an error.
Expand Down
4 changes: 2 additions & 2 deletions artifactory/commands/dotnet/dotnetcommand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestInitNewConfig(t *testing.T) {
</configuration>`, string(buf[:n]))
server.Password = ""
server.AccessToken = "abc123"
configFile, err = InitNewConfig(tmpDir, repoName, server, true, false)
configFile, err = InitNewConfig(tmpDir, repoName, server, true, true)
assert.NoError(t, err)
updatedConfigFile, err := os.Open(configFile.Name())
assert.NoError(t, err)
Expand All @@ -111,7 +111,7 @@ func TestInitNewConfig(t *testing.T) {
assert.Equal(t, `<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="JFrogCli" value="https://server.com/artifactory/api/nuget/test-repo" protocolVersion="2" allowInsecureConnections="false"/>
<add key="JFrogCli" value="https://server.com/artifactory/api/nuget/test-repo" protocolVersion="2" allowInsecureConnections="true"/>
</packageSources>
<packageSourceCredentials>
<JFrogCli>
Expand Down

0 comments on commit 04daeb8

Please sign in to comment.