Skip to content

Commit

Permalink
default test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykazakov committed Aug 16, 2024
1 parent 114a3d3 commit dc89633
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/test/socialevent/socialevent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, "base1ns", e.Spec.SpaceTier) // default
assert.Equal(t, 10, e.Spec.MaxAttendees) // default
assert.Equal(t, 0, e.Status.ActivationCount) // default
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom user tier", func(t *testing.T) {
Expand All @@ -32,6 +33,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, "base1ns", e.Spec.SpaceTier) // default
assert.Equal(t, 10, e.Spec.MaxAttendees) // default
assert.Equal(t, 0, e.Status.ActivationCount) // default
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom space tier", func(t *testing.T) {
Expand All @@ -52,6 +54,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, "base1ns", e.Spec.SpaceTier) // default
assert.Equal(t, 5, e.Spec.MaxAttendees) // custom
assert.Equal(t, 0, e.Status.ActivationCount) // default
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom activation count", func(t *testing.T) {
Expand All @@ -62,6 +65,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, "base1ns", e.Spec.SpaceTier) // default
assert.Equal(t, 10, e.Spec.MaxAttendees) // default
assert.Equal(t, 1, e.Status.ActivationCount) // custom
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom start time", func(t *testing.T) {
Expand All @@ -75,6 +79,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, 10, e.Spec.MaxAttendees) // default
assert.Equal(t, 0, e.Status.ActivationCount) // default
assert.Equal(t, metav1.NewTime(start), e.Spec.StartTime) // custom
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom end time", func(t *testing.T) {
Expand All @@ -88,6 +93,7 @@ func TestNewSocialEvent(t *testing.T) {
assert.Equal(t, 10, e.Spec.MaxAttendees) // default
assert.Equal(t, 0, e.Status.ActivationCount) // default
assert.Equal(t, metav1.NewTime(end), e.Spec.EndTime) // custom
assert.Empty(t, e.Spec.TargetCluster) // default
})

t.Run("with custom target cluster", func(t *testing.T) {
Expand Down

0 comments on commit dc89633

Please sign in to comment.