Skip to content

Commit

Permalink
add integration test slack api w oauthTokenFile also with mentioned a…
Browse files Browse the repository at this point in the history
…ccounts

Signed-off-by: hungran <26101787+hungran@users.noreply.github.com>
  • Loading branch information
hungran committed Jul 27, 2023
1 parent d7cd12a commit d1250d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/config/piped_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,21 @@ func TestPipedConfig(t *testing.T) {
ChannelID: "testid",
},
},
{
Name: "integration-slack-api-with-oauthTokenFile",
Slack: &NotificationReceiverSlack{
OAuthTokenFile: "foo/bar",
ChannelID: "testid",
},
},
{
Name: "integration-slack-api-with-oauthTokenFile-and-mentioned-accounts",
Slack: &NotificationReceiverSlack{
OAuthTokenFile: "foo/bar",
ChannelID: "testid",
MentionedAccounts: []string{"user1", "user2"},
},
},
{
Name: "integration-slack-api-with-oauthTokenData-and-mentioned-accounts",
Slack: &NotificationReceiverSlack{
Expand Down
11 changes: 11 additions & 0 deletions pkg/config/testdata/piped/piped-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ spec:
slack:
oauthTokenData: token
channelID: testid
- name: integration-slack-api-with-oauthTokenFile
slack:
oauthTokenFile: 'foo/bar'
channelID: testid
- name: integration-slack-api-with-oauthTokenFile-and-mentioned-accounts
slack:
oauthTokenFile: 'foo/bar'
channelID: testid
mentionedAccounts:
- 'user1'
- '@user2'
- name: integration-slack-api-with-oauthTokenData-and-mentioned-accounts
slack:
oauthTokenData: token
Expand Down

0 comments on commit d1250d7

Please sign in to comment.