"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/cmd/secret/set/set_test.go" between
gh-cli-1.11.0.tar.gz and gh-cli-1.12.0.tar.gz

About: GitHub CLI is GitHub’s official command line tool.

set_test.go  (gh-cli-1.11.0):set_test.go  (gh-cli-1.12.0)
skipping to change at line 222 skipping to change at line 222
var payload SecretPayload var payload SecretPayload
err = json.Unmarshal(data, &payload) err = json.Unmarshal(data, &payload)
assert.NoError(t, err) assert.NoError(t, err)
assert.Equal(t, payload.KeyID, "123") assert.Equal(t, payload.KeyID, "123")
assert.Equal(t, payload.EncryptedValue, "UKYUCbHd0DJemxa3AOcZ6XcsBwALG9d4 bpB8ZT0gSV39vl3BHiGSgj8zJapDxgB2BwqNqRhpjC4=") assert.Equal(t, payload.EncryptedValue, "UKYUCbHd0DJemxa3AOcZ6XcsBwALG9d4 bpB8ZT0gSV39vl3BHiGSgj8zJapDxgB2BwqNqRhpjC4=")
} }
func Test_setRun_env(t *testing.T) { func Test_setRun_env(t *testing.T) {
reg := &httpmock.Registry{} reg := &httpmock.Registry{}
reg.Register(httpmock.REST("GET", "repos/owner/repo/actions/secrets/publi c-key"), reg.Register(httpmock.REST("GET", "repos/owner/repo/environments/developm ent/secrets/public-key"),
httpmock.JSONResponse(PubKey{ID: "123", Key: "CDjXqf7AJBXWhMczcy+ Fs7JlACEptgceysutztHaFQI="})) httpmock.JSONResponse(PubKey{ID: "123", Key: "CDjXqf7AJBXWhMczcy+ Fs7JlACEptgceysutztHaFQI="}))
reg.Register(httpmock.REST("PUT", "repos/owner/repo/environments/developm ent/secrets/cool_secret"), httpmock.StatusStringResponse(201, `{}`)) reg.Register(httpmock.REST("PUT", "repos/owner/repo/environments/developm ent/secrets/cool_secret"), httpmock.StatusStringResponse(201, `{}`))
io, _, _, _ := iostreams.Test() io, _, _, _ := iostreams.Test()
opts := &SetOptions{ opts := &SetOptions{
HttpClient: func() (*http.Client, error) { HttpClient: func() (*http.Client, error) {
return &http.Client{Transport: reg}, nil return &http.Client{Transport: reg}, nil
}, },
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)