File: status_spec.rb

package info (click to toggle)
ruby-riddle 2.3.1-2~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,752 kB
  • sloc: sql: 25,022; php: 5,992; ruby: 4,757; sh: 59; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 666 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

if Riddle.loaded_version == '0.9.9' || Riddle.loaded_version == '1.10'
  describe "Sphinx Status", :live => true do
    before :each do
      @client = Riddle::Client.new("localhost", 9313)
      @status = @client.status
    end
  
    it "should return a hash" do
      @status.should be_a(Hash)
    end
  
    it "should include the uptime, connections, and command_search keys" do
      # Not checking all values, but ensuring keys are being set correctly
      @status[:uptime].should_not be_nil
      @status[:connections].should_not be_nil
      @status[:command_search].should_not be_nil
    end
  end
end