aws_elb_health_check 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40d15eef37ad7221dc935ec3b144d426ad9f2e15
4
- data.tar.gz: a1aa8c7680d5dafda34e79373b4ccb437c33e3c6
3
+ metadata.gz: 79f61cf2da5da5c88f06d150dc14185ca40950c6
4
+ data.tar.gz: 0a9d2f91a69c475ac7a02724ceedb7dbec500589
5
5
  SHA512:
6
- metadata.gz: b797f50212d5fd71c9a8bb899c2fb4b7e15f0e5523ac7fcd530c3f133e4959892f9d0bf4ff2a1f82e8ea2c3e96c9d50bf5d83aa1c9a704f491e59029dee261c9
7
- data.tar.gz: fefcbcd47a5b03a22997fe83404df903f87935d20b70e6d98de47134f1ac69a4cdd1d974bc9540f03bd6675aa8a23faa934eef08abb5e67020bbdd9c048ea9aa
6
+ metadata.gz: 847a5374da357bccc1cfc027dc6cacc789d1846af8c577c2fd3ba4c3fbce5654ec5109fd555754331ff8c2f43f4e0ab4db92915e22efde682c894564f95711ca
7
+ data.tar.gz: e69a4e8dec03e08b5edca5f65ec35dfddbc799c64fd4f3035ad9f550a667ed77861d5000b48c09a2f7d8d6721eea935ca0939a83550d16d9894cf1b7b8f5d8dc
@@ -1,4 +1,4 @@
1
1
  AwsElbHealthCheck::Engine.routes.draw do
2
- get 'check/:check_key' => "health_checks#index"
2
+ get 'check/:check_key' => "health_checks#index", as: :check
3
3
 
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module AwsElbHealthCheck
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -20,7 +20,6 @@ module Dummy
20
20
  # config.i18n.default_locale = :de
21
21
 
22
22
  # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
24
23
  end
25
24
  end
26
25
 
@@ -22,7 +22,11 @@ Rails.application.configure do
22
22
 
23
23
  # Disable serving static files from the `/public` folder by default since
24
24
  # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
+ if config.respond_to?(:public_file_server)
26
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
27
+ else
28
+ config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
29
+ end
26
30
 
27
31
  # Compress JavaScripts and CSS.
28
32
  config.assets.js_compressor = :uglifier
@@ -13,8 +13,13 @@ Rails.application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
16
+ if config.respond_to?(:public_file_server)
17
+ config.public_file_server.enabled = true
18
+ config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
19
+ else
20
+ config.serve_static_files = true
21
+ config.static_cache_control = 'public, max-age=3600'
22
+ end
18
23
 
19
24
  # Show full error reports and disable caching.
20
25
  config.consider_all_requests_local = true
@@ -683,3 +683,255 @@ Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
683
683
  AwsElbHealthCheckTest: test_truth
684
684
  ---------------------------------
685
685
   (0.0ms) rollback transaction
686
+  (0.1ms) begin transaction
687
+ ----------------------------------------------------------------------------------------------------------
688
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
689
+ ----------------------------------------------------------------------------------------------------------
690
+  (0.1ms) rollback transaction
691
+  (0.1ms) begin transaction
692
+ ----------------------------------------------------------------------------------------------
693
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
694
+ ----------------------------------------------------------------------------------------------
695
+  (0.1ms) rollback transaction
696
+  (0.1ms) begin transaction
697
+ -----------------------------------------------------------------------------------------------
698
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
699
+ -----------------------------------------------------------------------------------------------
700
+  (0.1ms) rollback transaction
701
+  (0.0ms) begin transaction
702
+ ---------------------------------
703
+ AwsElbHealthCheckTest: test_truth
704
+ ---------------------------------
705
+  (0.0ms) rollback transaction
706
+  (0.1ms) begin transaction
707
+ -----------------------------------------------------------------------------------------------
708
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
709
+ -----------------------------------------------------------------------------------------------
710
+  (0.1ms) rollback transaction
711
+  (0.1ms) begin transaction
712
+ ----------------------------------------------------------------------------------------------
713
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
714
+ ----------------------------------------------------------------------------------------------
715
+  (0.1ms) rollback transaction
716
+  (0.1ms) begin transaction
717
+ ----------------------------------------------------------------------------------------------------------
718
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
719
+ ----------------------------------------------------------------------------------------------------------
720
+  (0.1ms) rollback transaction
721
+  (0.1ms) begin transaction
722
+ ---------------------------------
723
+ AwsElbHealthCheckTest: test_truth
724
+ ---------------------------------
725
+  (0.1ms) rollback transaction
726
+  (0.1ms) begin transaction
727
+ ---------------------------------
728
+ AwsElbHealthCheckTest: test_truth
729
+ ---------------------------------
730
+  (0.0ms) rollback transaction
731
+  (0.0ms) begin transaction
732
+ ----------------------------------------------------------------------------------------------------------
733
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
734
+ ----------------------------------------------------------------------------------------------------------
735
+  (0.1ms) rollback transaction
736
+  (0.1ms) begin transaction
737
+ -----------------------------------------------------------------------------------------------
738
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
739
+ -----------------------------------------------------------------------------------------------
740
+  (0.0ms) rollback transaction
741
+  (0.0ms) begin transaction
742
+ ----------------------------------------------------------------------------------------------
743
+ AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
744
+ ----------------------------------------------------------------------------------------------
745
+  (0.0ms) rollback transaction
746
+  (0.1ms) begin transaction
747
+ ---------------------------------
748
+ AwsElbHealthCheckTest: test_truth
749
+ ---------------------------------
750
+  (0.0ms) rollback transaction
751
+  (0.0ms) begin transaction
752
+ ----------------------------------------------------------------------------
753
+ HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
754
+ ----------------------------------------------------------------------------
755
+  (0.1ms) rollback transaction
756
+  (0.1ms) begin transaction
757
+ ----------------------------------------------------------------
758
+ HealthCheckTest: test_should_get_success_when_secret_key_is_used
759
+ ----------------------------------------------------------------
760
+  (0.0ms) rollback transaction
761
+  (0.1ms) begin transaction
762
+ -----------------------------------------------------------------
763
+ HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
764
+ -----------------------------------------------------------------
765
+  (0.1ms) rollback transaction
766
+  (0.1ms) begin transaction
767
+ -----------------------------------------------------------------
768
+ HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
769
+ -----------------------------------------------------------------
770
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:28:12 -0400
771
+  (0.1ms) rollback transaction
772
+  (0.1ms) begin transaction
773
+ ----------------------------------------------------------------------------
774
+ HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
775
+ ----------------------------------------------------------------------------
776
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:28:12 -0400
777
+  (0.0ms) rollback transaction
778
+  (0.0ms) begin transaction
779
+ ----------------------------------------------------------------
780
+ HealthCheckTest: test_should_get_success_when_secret_key_is_used
781
+ ----------------------------------------------------------------
782
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf" for 127.0.0.1 at 2016-11-02 09:28:12 -0400
783
+  (0.1ms) rollback transaction
784
+  (0.0ms) begin transaction
785
+ ---------------------------------
786
+ AwsElbHealthCheckTest: test_truth
787
+ ---------------------------------
788
+  (0.0ms) rollback transaction
789
+  (0.1ms) begin transaction
790
+ ---------------------------------
791
+ AwsElbHealthCheckTest: test_truth
792
+ ---------------------------------
793
+  (0.0ms) rollback transaction
794
+  (0.0ms) begin transaction
795
+ ----------------------------------------------------------------
796
+ HealthCheckTest: test_should_get_success_when_secret_key_is_used
797
+ ----------------------------------------------------------------
798
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf" for 127.0.0.1 at 2016-11-02 09:28:30 -0400
799
+  (0.1ms) rollback transaction
800
+  (0.0ms) begin transaction
801
+ ----------------------------------------------------------------------------
802
+ HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
803
+ ----------------------------------------------------------------------------
804
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:28:30 -0400
805
+  (0.0ms) rollback transaction
806
+  (0.0ms) begin transaction
807
+ -----------------------------------------------------------------
808
+ HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
809
+ -----------------------------------------------------------------
810
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:28:30 -0400
811
+  (0.0ms) rollback transaction
812
+  (0.1ms) begin transaction
813
+ ---------------------------------
814
+ AwsElbHealthCheckTest: test_truth
815
+ ---------------------------------
816
+  (0.0ms) rollback transaction
817
+  (0.0ms) begin transaction
818
+ ----------------------------------------------------------------
819
+ HealthCheckTest: test_should_get_success_when_secret_key_is_used
820
+ ----------------------------------------------------------------
821
+  (0.1ms) rollback transaction
822
+  (0.1ms) begin transaction
823
+ ----------------------------------------------------------------------------
824
+ HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
825
+ ----------------------------------------------------------------------------
826
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:30:31 -0400
827
+  (0.1ms) rollback transaction
828
+  (0.1ms) begin transaction
829
+ -----------------------------------------------------------------
830
+ HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
831
+ -----------------------------------------------------------------
832
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:30:31 -0400
833
+  (0.1ms) rollback transaction
834
+  (0.1ms) begin transaction
835
+ -----------------------------------------------------------------------------------------------
836
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
837
+ -----------------------------------------------------------------------------------------------
838
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:31:17 -0400
839
+  (0.1ms) rollback transaction
840
+  (0.1ms) begin transaction
841
+ ------------------------------------------------------------------------------------
842
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
843
+ ------------------------------------------------------------------------------------
844
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:31:17 -0400
845
+  (0.0ms) rollback transaction
846
+  (0.1ms) begin transaction
847
+ -----------------------------------------------------------------------------------
848
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_success_when_secret_key_is_used
849
+ -----------------------------------------------------------------------------------
850
+  (0.0ms) rollback transaction
851
+  (0.1ms) begin transaction
852
+ ---------------------------------
853
+ AwsElbHealthCheckTest: test_truth
854
+ ---------------------------------
855
+  (0.0ms) rollback transaction
856
+  (0.1ms) begin transaction
857
+ ------------------------------------------------------------------------------------
858
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
859
+ ------------------------------------------------------------------------------------
860
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:31:57 -0400
861
+  (0.1ms) rollback transaction
862
+  (0.1ms) begin transaction
863
+ -----------------------------------------------------------------------------------------------
864
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
865
+ -----------------------------------------------------------------------------------------------
866
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:31:57 -0400
867
+  (0.0ms) rollback transaction
868
+  (0.1ms) begin transaction
869
+ -----------------------------------------------------------------------------------
870
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_success_when_secret_key_is_used
871
+ -----------------------------------------------------------------------------------
872
+ Started GET "/aws_elb_health_check/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf" for 127.0.0.1 at 2016-11-02 09:31:57 -0400
873
+  (0.1ms) rollback transaction
874
+  (0.0ms) begin transaction
875
+ ---------------------------------
876
+ AwsElbHealthCheckTest: test_truth
877
+ ---------------------------------
878
+  (0.1ms) rollback transaction
879
+  (0.1ms) begin transaction
880
+ ---------------------------------
881
+ AwsElbHealthCheckTest: test_truth
882
+ ---------------------------------
883
+  (0.0ms) rollback transaction
884
+  (0.0ms) begin transaction
885
+ -----------------------------------------------------------------------------------------------
886
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
887
+ -----------------------------------------------------------------------------------------------
888
+ Started GET "/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:32:52 -0400
889
+  (0.1ms) rollback transaction
890
+  (0.0ms) begin transaction
891
+ ------------------------------------------------------------------------------------
892
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
893
+ ------------------------------------------------------------------------------------
894
+ Started GET "/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:32:52 -0400
895
+  (0.0ms) rollback transaction
896
+  (0.0ms) begin transaction
897
+ -----------------------------------------------------------------------------------
898
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_success_when_secret_key_is_used
899
+ -----------------------------------------------------------------------------------
900
+ Started GET "/aws_elb_health_check/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf" for 127.0.0.1 at 2016-11-02 09:32:52 -0400
901
+ Processing by AwsElbHealthCheck::HealthChecksController#index as HTML
902
+ Parameters: {"check_key"=>"asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"}
903
+ Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
904
+  (0.0ms) rollback transaction
905
+  (0.1ms) begin transaction
906
+ ------------------------------------------------------------------------------------
907
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
908
+ ------------------------------------------------------------------------------------
909
+ Started GET "/aws_elb_health_check/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar" for 127.0.0.1 at 2016-11-02 09:33:19 -0400
910
+ Processing by AwsElbHealthCheck::HealthChecksController#index as HTML
911
+ Parameters: {"check_key"=>"asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlffoobar"}
912
+ Completed 403 Forbidden in 0ms (ActiveRecord: 0.0ms)
913
+  (0.0ms) rollback transaction
914
+  (0.1ms) begin transaction
915
+ -----------------------------------------------------------------------------------------------
916
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
917
+ -----------------------------------------------------------------------------------------------
918
+ Started GET "/aws_elb_health_check/check/asdfasdfasdf" for 127.0.0.1 at 2016-11-02 09:33:19 -0400
919
+ Processing by AwsElbHealthCheck::HealthChecksController#index as HTML
920
+ Parameters: {"check_key"=>"asdfasdfasdf"}
921
+ Application is not configured properly: 'AWS_ELB_HEALTH_CHECK_SECRET_KEY' is not set up, so no health check can ever pass
922
+ Completed 501 Not Implemented in 0ms (ActiveRecord: 0.0ms)
923
+  (0.0ms) rollback transaction
924
+  (0.0ms) begin transaction
925
+ -----------------------------------------------------------------------------------
926
+ AwsElbHealthCheck::HealthCheckTest: test_should_get_success_when_secret_key_is_used
927
+ -----------------------------------------------------------------------------------
928
+ Started GET "/aws_elb_health_check/check/asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf" for 127.0.0.1 at 2016-11-02 09:33:19 -0400
929
+ Processing by AwsElbHealthCheck::HealthChecksController#index as HTML
930
+ Parameters: {"check_key"=>"asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"}
931
+ Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
932
+  (0.0ms) rollback transaction
933
+  (0.0ms) begin transaction
934
+ ---------------------------------
935
+ AwsElbHealthCheckTest: test_truth
936
+ ---------------------------------
937
+  (0.0ms) rollback transaction
@@ -0,0 +1,27 @@
1
+ require 'test_helper'
2
+
3
+ module AwsElbHealthCheck
4
+ class HealthCheckTest < ActionDispatch::IntegrationTest
5
+ include Engine.routes.url_helpers
6
+ setup do
7
+ @routes = Engine.routes
8
+ end
9
+ test "should get success when secret key is used" do
10
+ ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] = "asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"
11
+ get check_url(ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"])
12
+ assert_response :success
13
+ end
14
+
15
+ test "should get failure when secret key is wrong" do
16
+ ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] = "asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"
17
+ get check_url(ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] + "foobar")
18
+ assert_response 403
19
+ end
20
+
21
+ test "should get 501 when secret key has not been configured" do
22
+ ENV.delete("AWS_ELB_HEALTH_CHECK_SECRET_KEY")
23
+ get check_url("asdfasdfasdf")
24
+ assert_response 501
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws_elb_health_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stitch Fix Engineering
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-28 00:00:00.000000000 Z
12
+ date: 2016-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 4.2.7.1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 4.2.7.1
28
28
  - !ruby/object:Gem::Dependency
@@ -76,7 +76,6 @@ files:
76
76
  - lib/aws_elb_health_check/version.rb
77
77
  - lib/tasks/aws_elb_health_check_tasks.rake
78
78
  - test/aws_elb_health_check_test.rb
79
- - test/controllers/aws_elb_health_check/health_checks_controller_test.rb
80
79
  - test/dummy/README.rdoc
81
80
  - test/dummy/Rakefile
82
81
  - test/dummy/app/assets/javascripts/application.js
@@ -115,7 +114,7 @@ files:
115
114
  - test/dummy/public/422.html
116
115
  - test/dummy/public/500.html
117
116
  - test/dummy/public/favicon.ico
118
- - test/integration/navigation_test.rb
117
+ - test/integration/aws_elb_health_check/health_check_test.rb
119
118
  - test/test_helper.rb
120
119
  homepage: https://github.com/stitchfix/aws_elb_health_check
121
120
  licenses:
@@ -143,7 +142,6 @@ specification_version: 4
143
142
  summary: Rails engine to provide a healthcheck suitable for AWS ELBs
144
143
  test_files:
145
144
  - test/aws_elb_health_check_test.rb
146
- - test/controllers/aws_elb_health_check/health_checks_controller_test.rb
147
145
  - test/dummy/app/assets/javascripts/application.js
148
146
  - test/dummy/app/assets/stylesheets/application.css
149
147
  - test/dummy/app/controllers/application_controller.rb
@@ -182,5 +180,5 @@ test_files:
182
180
  - test/dummy/public/favicon.ico
183
181
  - test/dummy/Rakefile
184
182
  - test/dummy/README.rdoc
185
- - test/integration/navigation_test.rb
183
+ - test/integration/aws_elb_health_check/health_check_test.rb
186
184
  - test/test_helper.rb
@@ -1,28 +0,0 @@
1
- require 'test_helper'
2
-
3
- module AwsElbHealthCheck
4
- class HealthChecksControllerTest < ActionController::TestCase
5
- setup do
6
- @routes = Engine.routes
7
- end
8
-
9
- test "should get success when secret key is used" do
10
- ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] = "asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"
11
- get :index, check_key: ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"]
12
- assert_response :success
13
- end
14
-
15
- test "should get failure when secret key is wrong" do
16
- ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] = "asdlkfjhasdlkfjhasdlkjfhasdlkfjhasdlf"
17
- get :index, check_key: ENV["AWS_ELB_HEALTH_CHECK_SECRET_KEY"] + "foobar"
18
- assert_response 403
19
- end
20
-
21
- test "should get 501 when secret key has not been configured" do
22
- ENV.delete("AWS_ELB_HEALTH_CHECK_SECRET_KEY")
23
- get :index, check_key: "asdfasdfasdf"
24
- assert_response 501
25
- end
26
-
27
- end
28
- end
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- class NavigationTest < ActionDispatch::IntegrationTest
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
8
-