test/configurator_test.rb in larva-0.9.2 vs test/configurator_test.rb in larva-1.0.0

- old
+ new

@@ -25,52 +25,9 @@ def test_filum_gets_config Configurator.configure(logfile: logfile, config_dir: config_dir) assert_equal logfile, Filum.logger.logfile end - def test_sdk_secret_key_can_be_overriden - sdk_yaml_path = File.expand_path('../../template/config/meducation-sdk.yml', __FILE__) - begin - optional_sdk_yaml_path = "#{sdk_yaml_path}.optional" - `cp #{optional_sdk_yaml_path} #{sdk_yaml_path}` - secret_key = "Foobar!" - Configurator.configure(logfile: logfile, config_dir: config_dir, meducation_sdk_secret_key: secret_key) - assert_equal secret_key, MeducationSDK.config.secret_key - ensure - `rm #{sdk_yaml_path}` - end - end - - def test_meducation_sdk_gets_config_in_dev - sdk_yaml_path = File.expand_path('../../template/config/meducation-sdk.yml', __FILE__) - begin - optional_sdk_yaml_path = "#{sdk_yaml_path}.optional" - `cp #{optional_sdk_yaml_path} #{sdk_yaml_path}` - Configurator.configure(config_dir: config_dir, logfile: logfile) - assert_equal "LarvaSpawn", MeducationSDK.config.access_id - assert_equal "foobar", MeducationSDK.config.secret_key - assert_equal Filum.logger, MeducationSDK.config.logger - assert_equal "http://localhost:3000/spi", MeducationSDK.config.endpoint - ensure - `rm #{sdk_yaml_path}` - end - end - - def test_meducation_sdk_gets_config_in_production - sdk_yaml_path = File.expand_path('../../template/config/meducation-sdk.yml', __FILE__) - begin - optional_sdk_yaml_path = "#{sdk_yaml_path}.optional" - `cp #{optional_sdk_yaml_path} #{sdk_yaml_path}` - Configurator.configure(config_dir: config_dir, logfile: logfile, env: 'production') - assert_equal "LarvaSpawn", MeducationSDK.config.access_id - assert_equal nil, MeducationSDK.config.secret_key - assert_equal Filum.logger, MeducationSDK.config.logger - assert_equal nil, MeducationSDK.config.endpoint - ensure - `rm #{sdk_yaml_path}` - end - end - def test_propono_gets_config Configurator.configure(config_dir: config_dir, logfile: logfile) assert_equal "MY-DEV-ACCESS-KEY", Propono.config.access_key assert_equal "MY-DEV-SECRET-KEY", Propono.config.secret_key assert_equal "eu-west-1", Propono.config.queue_region