Skip to content

Commit 4b7eabd

Browse files
fixed slack detector integration tests (#3748)
1 parent f9ce3e8 commit 4b7eabd

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

pkg/detectors/slack/slack_test.go

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ func TestSlack_FromChunk(t *testing.T) {
5252
{
5353
DetectorType: detectorspb.DetectorType_Slack,
5454
Verified: true,
55-
ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/"},
55+
ExtraData: map[string]string{
56+
"name": "marge.haskell.bridge",
57+
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/",
58+
"team": "ct.org",
59+
"token_type": "Slack User Token",
60+
},
5661
},
5762
},
5863
wantErr: false,
@@ -68,7 +73,10 @@ func TestSlack_FromChunk(t *testing.T) {
6873
{
6974
DetectorType: detectorspb.DetectorType_Slack,
7075
Verified: false,
71-
ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/"},
76+
ExtraData: map[string]string{
77+
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/",
78+
"token_type": "Slack User Token",
79+
},
7280
},
7381
},
7482
wantErr: false,
@@ -85,7 +93,10 @@ func TestSlack_FromChunk(t *testing.T) {
8593
{
8694
DetectorType: detectorspb.DetectorType_Slack,
8795
Verified: false,
88-
ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/"},
96+
ExtraData: map[string]string{
97+
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/",
98+
"token_type": "Slack User Token",
99+
},
89100
},
90101
},
91102
wantErr: false,
@@ -103,7 +114,10 @@ func TestSlack_FromChunk(t *testing.T) {
103114
{
104115
DetectorType: detectorspb.DetectorType_Slack,
105116
Verified: false,
106-
ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/"},
117+
ExtraData: map[string]string{
118+
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/",
119+
"token_type": "Slack User Token",
120+
},
107121
},
108122
},
109123
wantErr: false,
@@ -121,7 +135,10 @@ func TestSlack_FromChunk(t *testing.T) {
121135
{
122136
DetectorType: detectorspb.DetectorType_Slack,
123137
Verified: false,
124-
ExtraData: map[string]string{"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/"},
138+
ExtraData: map[string]string{
139+
"rotation_guide": "https://howtorotate.com/docs/tutorials/slack/",
140+
"token_type": "Slack User Token",
141+
},
125142
},
126143
},
127144
wantErr: false,

0 commit comments

Comments
 (0)