fix(deps): update stackit sdk modules (#988)
* fix(deps): update stackit sdk modules * chore(objectstorage): Attribute expires is now a NullableString Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> --------- Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de> Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
parent
8f8124e32d
commit
ba6ee8bd23
4 changed files with 10 additions and 10 deletions
|
|
@ -496,7 +496,7 @@ func mapFields(credentialResp *objectstorage.CreateAccessKeyResponse, model *Mod
|
|||
} else {
|
||||
// Harmonize the timestamp format
|
||||
// Eg. "2027-01-02T03:04:05.000Z" = "2027-01-02T03:04:05Z"
|
||||
expirationTimestamp, err := time.Parse(time.RFC3339, *credentialResp.Expires)
|
||||
expirationTimestamp, err := time.Parse(time.RFC3339, *credentialResp.Expires.Get())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to parse payload expiration timestamp '%v': %w", *credentialResp.Expires, err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ func TestMapFields(t *testing.T) {
|
|||
&objectstorage.CreateAccessKeyResponse{
|
||||
AccessKey: utils.Ptr("key"),
|
||||
DisplayName: utils.Ptr("name"),
|
||||
Expires: utils.Ptr(now.Format(time.RFC3339)),
|
||||
Expires: objectstorage.NewNullableString(utils.Ptr(now.Format(time.RFC3339))),
|
||||
SecretAccessKey: utils.Ptr("secret-key"),
|
||||
},
|
||||
Model{
|
||||
|
|
@ -100,7 +100,7 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
"expiration_timestamp_with_fractional_seconds",
|
||||
&objectstorage.CreateAccessKeyResponse{
|
||||
Expires: utils.Ptr(now.Format(time.RFC3339Nano)),
|
||||
Expires: objectstorage.NewNullableString(utils.Ptr(now.Format(time.RFC3339Nano))),
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue(id),
|
||||
|
|
@ -123,7 +123,7 @@ func TestMapFields(t *testing.T) {
|
|||
{
|
||||
"bad_time",
|
||||
&objectstorage.CreateAccessKeyResponse{
|
||||
Expires: utils.Ptr("foo-bar"),
|
||||
Expires: objectstorage.NewNullableString(utils.Ptr("foo-bar")),
|
||||
},
|
||||
Model{},
|
||||
false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue