Skip to content
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

test(storage): skip tests using OLM Age condition #6538

Merged
merged 3 commits into from
Aug 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 18 additions & 10 deletions storage/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import (
raw "google.golang.org/api/storage/v1"
)

// TODO(#6539): re-enable tests after breaking change is released and AgeInDays is a int64*
func TestBucketAttrsToRawBucket(t *testing.T) {
t.Skip("TestBucketAttrsToRawBucket skipped: https://github.com/googleapis/google-cloud-go/issues/6539")
t.Parallel()
attrs := &BucketAttrs{
Name: "name",
Expand Down Expand Up @@ -161,7 +163,7 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
StorageClass: "NEARLINE",
},
Condition: &raw.BucketLifecycleRuleCondition{
Age: 10,
//Age: 10,
IsLive: googleapi.Bool(true),
CreatedBefore: "2017-01-02",
MatchesStorageClass: []string{"STANDARD"},
Expand Down Expand Up @@ -197,7 +199,7 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
Type: DeleteAction,
},
Condition: &raw.BucketLifecycleRuleCondition{
Age: 10,
//Age: 10,
MatchesPrefix: []string{"testPrefix"},
MatchesSuffix: []string{"testSuffix"},
NumNewerVersions: 3,
Expand All @@ -210,14 +212,16 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
Condition: &raw.BucketLifecycleRuleCondition{
IsLive: googleapi.Bool(false),
},
}, {
},
{
Action: &raw.BucketLifecycleRuleAction{
Type: AbortIncompleteMPUAction,
},
Condition: &raw.BucketLifecycleRuleCondition{
Age: 20,
//Age: 20,
},
}},
},
},
},
}
if msg := testutil.Diff(got, want); msg != "" {
Expand Down Expand Up @@ -346,7 +350,9 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
}
}

// TODO(#6539): re-enable tests after breaking change is released and AgeInDays is a int64*
func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
t.Skip("TestBucketAttrsToUpdateToRawBucket skipped: https://github.com/googleapis/google-cloud-go/issues/6539")
t.Parallel()
au := &BucketAttrsToUpdate{
VersioningEnabled: false,
Expand Down Expand Up @@ -402,12 +408,12 @@ func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
Lifecycle: &raw.BucketLifecycle{
Rule: []*raw.BucketLifecycleRule{
{
Action: &raw.BucketLifecycleRuleAction{Type: "Delete"},
Condition: &raw.BucketLifecycleRuleCondition{Age: 30},
Action: &raw.BucketLifecycleRuleAction{Type: "Delete"},
//Condition: &raw.BucketLifecycleRuleCondition{Age: 30},
},
{
Action: &raw.BucketLifecycleRuleAction{Type: AbortIncompleteMPUAction},
Condition: &raw.BucketLifecycleRuleCondition{Age: 13},
Action: &raw.BucketLifecycleRuleAction{Type: AbortIncompleteMPUAction},
//Condition: &raw.BucketLifecycleRuleCondition{Age: 13},
},
},
},
Expand Down Expand Up @@ -575,7 +581,9 @@ func TestAgeConditionBackwardCompat(t *testing.T) {

}

// TODO(#6539): re-enable tests after breaking change is released and AgeInDays is a int64*
func TestNewBucket(t *testing.T) {
t.Skip("TestNewBucket skipped: https://github.com/googleapis/google-cloud-go/issues/6539")
labels := map[string]string{"a": "b"}
matchClasses := []string{"STANDARD"}
aTime := time.Date(2017, 1, 2, 0, 0, 0, 0, time.UTC)
Expand All @@ -597,7 +605,7 @@ func TestNewBucket(t *testing.T) {
StorageClass: "NEARLINE",
},
Condition: &raw.BucketLifecycleRuleCondition{
Age: 10,
// Age: 10,
IsLive: googleapi.Bool(true),
CreatedBefore: "2017-01-02",
MatchesStorageClass: matchClasses,
Expand Down