Browse Source

Maintenance: 'slack-api' Ruby gem and 'channels.*' Slack API commands are deprecated and break CI.

Thorsten Eckel 4 years ago
parent
commit
3b601ac16c
2 changed files with 5 additions and 5 deletions
  1. 1 1
      .gitlab/ci/integration/slack.yml
  2. 4 4
      test/integration/slack_test.rb

+ 1 - 1
.gitlab/ci/integration/slack.yml

@@ -10,6 +10,6 @@ slack:
     - when: always
   script:
     - bundle exec rake zammad:db:unseeded
-    - echo "gem 'slack-api'" >> Gemfile.local
+    - echo "gem 'slack-ruby-client'" >> Gemfile.local
     - bundle install -j $(nproc)
     - bundle exec rails test test/integration/slack_test.rb

+ 4 - 4
test/integration/slack_test.rb

@@ -276,10 +276,10 @@ class SlackTest < ActiveSupport::TestCase
       config.token = ENV['SLACK_CI_CHECKER_TOKEN']
     end
 
-    Slack.auth_test
+    client = Slack::Web::Client.new
+    client.auth_test
 
-    client = Slack::Client.new
-    channels = client.channels_list['channels']
+    channels = client.conversations_list['channels']
     channel_id = nil
     channels.each do |channel|
       next if channel['name'] != channel_name
@@ -290,7 +290,7 @@ class SlackTest < ActiveSupport::TestCase
       raise "ERROR: No such channel '#{channel_name}'"
     end
 
-    channel_history = client.channels_history(channel: channel_id)
+    channel_history = client.conversations_history(channel: channel_id)
     if !channel_history
       raise "ERROR: No history for channel #{channel_name}/#{channel_id}"
     end