-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PublicKey field to S3 all CRUD actions #198
Conversation
…field Signed-off-by: Colton J. McCurdy <cmccurdy@fastly.com>
Signed-off-by: Colton J. McCurdy <cmccurdy@fastly.com>
@@ -290,6 +290,68 @@ wMfrTEOvx0NxUM3rpaCgEmuWbB1G1Hu371oyr4srrr+N | |||
` | |||
} | |||
|
|||
// pgpPublicKeyUpdate returns a PEM encoded PGP public key suitable for testing | |||
// updates to the public key field. | |||
func pgpPublicKeyUpdate() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm "iffy" on doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are fake keys all over the test suite, this doesn't bother me too much. Worth adding to the list of testing cleanup TODOs, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your concerns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern was just introducing another test helper that just returned some mocked data.
@@ -30,6 +30,38 @@ interactions: | |||
- "12" | |||
placement: | |||
- waf_debug | |||
public_key: | |||
- | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new
name: | ||
- new-test-s3 | ||
public_key: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new field
@@ -27,10 +27,12 @@ func TestClient_S3s(t *testing.T) { | |||
GzipLevel: 9, | |||
Format: "format", | |||
FormatVersion: 2, | |||
ResponseCondition: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly setting zero value just to show that it is covered.
However without adding additional setup --- i.e., creating a valid response condition --- we can't set a value here.
Maybe a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coverage here seems fine to me. If you think a comment will help highlight your concern in the future, go for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fin as-is
Version: tv.Number, | ||
Name: "test-s3", | ||
NewName: "new-test-s3", | ||
PublicKey: pgpPublicKeyUpdate(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update public key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
@@ -290,6 +290,68 @@ wMfrTEOvx0NxUM3rpaCgEmuWbB1G1Hu371oyr4srrr+N | |||
` | |||
} | |||
|
|||
// pgpPublicKeyUpdate returns a PEM encoded PGP public key suitable for testing | |||
// updates to the public key field. | |||
func pgpPublicKeyUpdate() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your concerns?
@@ -27,10 +27,12 @@ func TestClient_S3s(t *testing.T) { | |||
GzipLevel: 9, | |||
Format: "format", | |||
FormatVersion: 2, | |||
ResponseCondition: "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fin as-is
Proposed Change(s)
PublicKey
field to Creates and Updates and responses.Relevant Link(s) / Documentation
Validation