make tests less sus (#3689)
#### Type of change - [x] 🤖 Supportability/Tests #### Test Plan - [x] ⚡ Unit test
This commit is contained in:
parent
ce3ecacbe2
commit
c7ce9f4c0e
@ -484,17 +484,17 @@ func (suite *GraphErrorsUnitSuite) TestGraphStack_labels() {
|
||||
{
|
||||
name: "mysite not found",
|
||||
err: odErrMsg("code", string(MysiteNotFound)),
|
||||
expect: []string{},
|
||||
expect: []string{LabelsMysiteNotFound},
|
||||
},
|
||||
{
|
||||
name: "mysite url not found",
|
||||
err: odErrMsg("code", string(MysiteURLNotFound)),
|
||||
expect: []string{},
|
||||
expect: []string{LabelsMysiteNotFound},
|
||||
},
|
||||
{
|
||||
name: "no sp license",
|
||||
err: odErrMsg("code", string(NoSPLicense)),
|
||||
expect: []string{},
|
||||
expect: []string{LabelsNoSharePointLicense},
|
||||
},
|
||||
}
|
||||
for _, test := range table {
|
||||
@ -509,6 +509,11 @@ func (suite *GraphErrorsUnitSuite) TestGraphStack_labels() {
|
||||
for _, e := range test.expect {
|
||||
assert.True(t, clues.HasLabel(result, e), clues.ToCore(result))
|
||||
}
|
||||
|
||||
labels := clues.Labels(result)
|
||||
assert.Equal(t,
|
||||
len(test.expect), len(labels),
|
||||
"result should have as many labels as expected")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user