Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Nov 14, 2024
1 parent f373c13 commit fb60a35
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions pkg/cmd/vendorapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,30 @@ func Test_getCurrentAppChannelRelease(t *testing.T) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"channelReleases": [
{
"channelId": "channel-id",
"channelSequence": 2,
"releaseSequence": 2,
"versionLabel": "2.0.0",
"isRequired": true,
"semver": "2.0.0",
"createdAt": "2023-10-01T00:00:00Z",
"releaseNotes": "release notes"
"releaseNotes": "release notes",
"replicatedRegistryDomain": "replicated.app",
"replicatedProxyDomain": "replicated.app"
}
]}`))
},
want: &apiChannelRelease{
ChannelSequence: 2,
ReleaseSequence: 2,
VersionLabel: "2.0.0",
IsRequired: true,
CreatedAt: "2023-10-01T00:00:00Z",
ReleaseNotes: "release notes",
ChannelID: "channel-id",
ChannelSequence: 2,
ReleaseSequence: 2,
VersionLabel: "2.0.0",
IsRequired: true,
SemVer: "2.0.0",
CreatedAt: "2023-10-01T00:00:00Z",
ReleaseNotes: "release notes",
ReplicatedRegistryDomain: "replicated.app",
ReplicatedProxyDomain: "replicated.app",
},
wantErr: false,
},
Expand Down Expand Up @@ -115,12 +123,16 @@ func Test_maybePromptForAppUpdate(t *testing.T) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"channelReleases": [
{
"channelId": "channel-id",
"channelSequence": 1,
"releaseSequence": 1,
"versionLabel": "1.0.0",
"isRequired": true,
"semver": "1.0.0",
"createdAt": "2023-10-01T00:00:00Z",
"releaseNotes": "release notes"
"releaseNotes": "release notes",
"replicatedRegistryDomain": "replicated.app",
"replicatedProxyDomain": "replicated.app"
}
]}`))
},
Expand All @@ -140,12 +152,16 @@ func Test_maybePromptForAppUpdate(t *testing.T) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"channelReleases": [
{
"channelId": "channel-id",
"channelSequence": 2,
"releaseSequence": 2,
"versionLabel": "2.0.0",
"isRequired": true,
"semver": "2.0.0",
"createdAt": "2023-10-01T00:00:00Z",
"releaseNotes": "release notes"
"releaseNotes": "release notes",
"replicatedRegistryDomain": "replicated.app",
"replicatedProxyDomain": "replicated.app"
}
]}`))
},
Expand All @@ -165,12 +181,16 @@ func Test_maybePromptForAppUpdate(t *testing.T) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"channelReleases": [
{
"channelId": "channel-id",
"channelSequence": 2,
"releaseSequence": 2,
"versionLabel": "2.0.0",
"isRequired": true,
"semver": "2.0.0",
"createdAt": "2023-10-01T00:00:00Z",
"releaseNotes": "release notes"
"releaseNotes": "release notes",
"replicatedRegistryDomain": "replicated.app",
"replicatedProxyDomain": "replicated.app"
}
]}`))
},
Expand Down

0 comments on commit fb60a35

Please sign in to comment.