Skip to content

Commit

Permalink
delete useless test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
GoneLikeAir committed Jan 13, 2021
1 parent 18cf449 commit 9ac56c0
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions dockin-opserver/internal/utils/base/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func TestIsSubSystemId(t *testing.T) {
t.Run("right system id", func(t *testing.T) {
input := "5250"
input := "0000"
assert.True(t, IsSubSystemId(input))
})

Expand All @@ -43,37 +43,22 @@ func TestIsSubSystemId(t *testing.T) {
}

func TestIsPodSet(t *testing.T) {
t.Run("given uat podName", func(t *testing.T) {
assert.False(t, IsPodSet("dockin-wx-20191012-180011777-0"))
})
t.Run("given pt podName", func(t *testing.T) {
assert.False(t, IsPodSet("cps-hdcnbatch-10-108-130-198-0"))
})
t.Run("given prd podName", func(t *testing.T) {
assert.False(t, IsPodSet("cps-hdcnbatch-10-108-130-198"))
})
t.Run("test pod set name", func(t *testing.T) {
assert.True(t, IsPodSet("gns-query-0"))
t.Run("given podName", func(t *testing.T) {
assert.False(t, IsPodSet("xxx"))
})
t.Run("test pod set name", func(t *testing.T) {
assert.True(t, IsPodSet("5244-0"))
assert.True(t, IsPodSet("xxx"))
})
}

func TestIsPodName(t *testing.T) {
t.Run("given uat podName", func(t *testing.T) {
assert.True(t, IsPodName("dockin-wx-20191012-180011777-0"))
})
t.Run("given pt podName", func(t *testing.T) {
assert.True(t, IsPodName("cps-hdcnbatch-10-108-130-198-0"))
})
t.Run("given prd podName", func(t *testing.T) {
assert.True(t, IsPodName("cps-hdcnbatch-10-108-130-198"))
t.Run("given podName", func(t *testing.T) {
assert.True(t, IsPodName("xxx"))
})
t.Run("test pod set name", func(t *testing.T) {
assert.False(t, IsPodName("gns-query-0"))
assert.False(t, IsPodName("xxx"))
})
t.Run("test pod set name", func(t *testing.T) {
assert.False(t, IsPodName("5244-0"))
assert.False(t, IsPodName("xxx"))
})
}

0 comments on commit 9ac56c0

Please sign in to comment.