You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #152 (comment), the smoke tests in the smoke/ directory are in need of improvement.
Currently, the smoke test suite is simply a collection of Ruby files, which are executed in the smoke Rake task. meaning any of the expected goodies like a set up/tear down mechanism, assertions simply don't exist. To get around this, the smoke/noaa-sample-data.rb has a test_case method, which is more of a bad joke...
This hacky solution exists, because I didn't want to run the smoke tests, when a user simply executes rake or rspec in the Gem's root directory, but only when certain conditions are met (like ENV["travis"] == "true" indicating a CI server), and because filtering the file list in the specs/spec_helper.rb was even more of an adventure.
In retrospect, an .rspec file with an --exclude pattern might have been enough.
Your task, should you choose to accept it, would be:
moving the smoke test files from smoke/ to specs/smoke/ and converting them to RSpec specs
moving the smoke/provision.sh to a more appropriate place (root dir would be okay, I guess)
finding a way to automatically exclude spec/smoke/**/*.rb when invoking any of these commands:
rake and rake spec
rspec and rspec ./spec
This should generate a visible warning when ENV["travis"] != "true" (and not run the smoke tests):
rspec ./spec/**/* or rspec ./spec/smoke
You will probably need/want to run the smoke tests on your local machine. To do that, install a current version of InfluxDB locally, and create the following users and databases (this is extracted from the smoke/provision.sh:
CREATEUSERroot WITH PASSWORD 'toor' WITH ALL PRIVILEGES
CREATEUSERtest_user WITH PASSWORD 'resu_tset'CREATEDATABASEdb_oneCREATEDATABASEdb_twoGRANT ALL ON db_two TO test_user
GRANT ALL ON NOAA_water_database TO test_user
Then download and import the NOAA sample data set:
curl https://s3-us-west-1.amazonaws.com/noaa.water.database.0.9/NOAA_data.txt > noaa.txt
influx -import -path noaa.txt -precision s
and enable HTTP authentication in /etc/influxdb/influxdb.conf (auth-enabled = true in the [http] section). Finally restart the server (systemctl restart influxd.service on Debian)
The text was updated successfully, but these errors were encountered:
As mentioned in #152 (comment), the smoke tests in the
smoke/
directory are in need of improvement.Currently, the smoke test suite is simply a collection of Ruby files, which are executed in the
smoke
Rake task. meaning any of the expected goodies like a set up/tear down mechanism, assertions simply don't exist. To get around this, thesmoke/noaa-sample-data.rb
has atest_case
method, which is more of a bad joke...This hacky solution exists, because I didn't want to run the smoke tests, when a user simply executes
rake
orrspec
in the Gem's root directory, but only when certain conditions are met (likeENV["travis"] == "true"
indicating a CI server), and because filtering the file list in thespecs/spec_helper.rb
was even more of an adventure.In retrospect, an
.rspec
file with an--exclude
pattern might have been enough.Your task, should you choose to accept it, would be:
smoke/
tospecs/smoke/
and converting them to RSpec specssmoke/provision.sh
to a more appropriate place (root dir would be okay, I guess)spec/smoke/**/*.rb
when invoking any of these commands:rake
andrake spec
rspec
andrspec ./spec
This should generate a visible warning when
ENV["travis"] != "true"
(and not run the smoke tests):rspec ./spec/**/*
orrspec ./spec/smoke
You will probably need/want to run the smoke tests on your local machine. To do that, install a current version of InfluxDB locally, and create the following users and databases (this is extracted from the
smoke/provision.sh
:Then download and import the NOAA sample data set:
curl https://s3-us-west-1.amazonaws.com/noaa.water.database.0.9/NOAA_data.txt > noaa.txt influx -import -path noaa.txt -precision s
and enable HTTP authentication in
/etc/influxdb/influxdb.conf
(auth-enabled = true
in the[http]
section). Finally restart the server (systemctl restart influxd.service
on Debian)The text was updated successfully, but these errors were encountered: