(t *testing.T)
| 45 | } |
| 46 | |
| 47 | func TestShuffleShardExpectedInstances(t *testing.T) { |
| 48 | tests := []struct { |
| 49 | shardSize int |
| 50 | numZones int |
| 51 | expected int |
| 52 | }{ |
| 53 | { |
| 54 | shardSize: 1, |
| 55 | numZones: 1, |
| 56 | expected: 1, |
| 57 | }, |
| 58 | { |
| 59 | shardSize: 1, |
| 60 | numZones: 3, |
| 61 | expected: 3, |
| 62 | }, |
| 63 | { |
| 64 | shardSize: 3, |
| 65 | numZones: 3, |
| 66 | expected: 3, |
| 67 | }, |
| 68 | { |
| 69 | shardSize: 4, |
| 70 | numZones: 3, |
| 71 | expected: 6, |
| 72 | }, |
| 73 | { |
| 74 | shardSize: 6, |
| 75 | numZones: 3, |
| 76 | expected: 6, |
| 77 | }, |
| 78 | } |
| 79 | |
| 80 | for _, test := range tests { |
| 81 | assert.Equal(t, test.expected, ShuffleShardExpectedInstances(test.shardSize, test.numZones)) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | func TestDynamicShardSize(t *testing.T) { |
| 86 | tests := []struct { |
nothing calls this directly
no test coverage detected