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 +4 -4
- data/config/routes.rb +1 -1
- data/lib/aws_elb_health_check/version.rb +1 -1
- data/test/dummy/config/application.rb +0 -1
- data/test/dummy/config/environments/production.rb +5 -1
- data/test/dummy/config/environments/test.rb +7 -2
- data/test/dummy/log/test.log +252 -0
- data/test/integration/aws_elb_health_check/health_check_test.rb +27 -0
- metadata +6 -8
- data/test/controllers/aws_elb_health_check/health_checks_controller_test.rb +0 -28
- data/test/integration/navigation_test.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79f61cf2da5da5c88f06d150dc14185ca40950c6
|
4
|
+
data.tar.gz: 0a9d2f91a69c475ac7a02724ceedb7dbec500589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 847a5374da357bccc1cfc027dc6cacc789d1846af8c577c2fd3ba4c3fbce5654ec5109fd555754331ff8c2f43f4e0ab4db92915e22efde682c894564f95711ca
|
7
|
+
data.tar.gz: e69a4e8dec03e08b5edca5f65ec35dfddbc799c64fd4f3035ad9f550a667ed77861d5000b48c09a2f7d8d6721eea935ca0939a83550d16d9894cf1b7b8f5d8dc
|
data/config/routes.rb
CHANGED
@@ -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.
|
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.
|
17
|
-
|
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
|
data/test/dummy/log/test.log
CHANGED
@@ -683,3 +683,255 @@ Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
|
|
683
683
|
AwsElbHealthCheckTest: test_truth
|
684
684
|
---------------------------------
|
685
685
|
[1m[35m (0.0ms)[0m rollback transaction
|
686
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
687
|
+
----------------------------------------------------------------------------------------------------------
|
688
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
|
689
|
+
----------------------------------------------------------------------------------------------------------
|
690
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
691
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
692
|
+
----------------------------------------------------------------------------------------------
|
693
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
|
694
|
+
----------------------------------------------------------------------------------------------
|
695
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
696
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
697
|
+
-----------------------------------------------------------------------------------------------
|
698
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
|
699
|
+
-----------------------------------------------------------------------------------------------
|
700
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
701
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
702
|
+
---------------------------------
|
703
|
+
AwsElbHealthCheckTest: test_truth
|
704
|
+
---------------------------------
|
705
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
706
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
707
|
+
-----------------------------------------------------------------------------------------------
|
708
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
|
709
|
+
-----------------------------------------------------------------------------------------------
|
710
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
711
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
712
|
+
----------------------------------------------------------------------------------------------
|
713
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
|
714
|
+
----------------------------------------------------------------------------------------------
|
715
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
716
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
717
|
+
----------------------------------------------------------------------------------------------------------
|
718
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
|
719
|
+
----------------------------------------------------------------------------------------------------------
|
720
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
721
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
722
|
+
---------------------------------
|
723
|
+
AwsElbHealthCheckTest: test_truth
|
724
|
+
---------------------------------
|
725
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
726
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
727
|
+
---------------------------------
|
728
|
+
AwsElbHealthCheckTest: test_truth
|
729
|
+
---------------------------------
|
730
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
731
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
732
|
+
----------------------------------------------------------------------------------------------------------
|
733
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_501_when_secret_key_has_not_been_configured
|
734
|
+
----------------------------------------------------------------------------------------------------------
|
735
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
736
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
737
|
+
-----------------------------------------------------------------------------------------------
|
738
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_failure_when_secret_key_is_wrong
|
739
|
+
-----------------------------------------------------------------------------------------------
|
740
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
741
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
742
|
+
----------------------------------------------------------------------------------------------
|
743
|
+
AwsElbHealthCheck::HealthChecksControllerTest: test_should_get_success_when_secret_key_is_used
|
744
|
+
----------------------------------------------------------------------------------------------
|
745
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
746
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
747
|
+
---------------------------------
|
748
|
+
AwsElbHealthCheckTest: test_truth
|
749
|
+
---------------------------------
|
750
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
751
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
752
|
+
----------------------------------------------------------------------------
|
753
|
+
HealthCheckTest: test_should_get_501_when_secret_key_has_not_been_configured
|
754
|
+
----------------------------------------------------------------------------
|
755
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
756
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
757
|
+
----------------------------------------------------------------
|
758
|
+
HealthCheckTest: test_should_get_success_when_secret_key_is_used
|
759
|
+
----------------------------------------------------------------
|
760
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
761
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
762
|
+
-----------------------------------------------------------------
|
763
|
+
HealthCheckTest: test_should_get_failure_when_secret_key_is_wrong
|
764
|
+
-----------------------------------------------------------------
|
765
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
766
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
772
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
778
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
784
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
785
|
+
---------------------------------
|
786
|
+
AwsElbHealthCheckTest: test_truth
|
787
|
+
---------------------------------
|
788
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
789
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
790
|
+
---------------------------------
|
791
|
+
AwsElbHealthCheckTest: test_truth
|
792
|
+
---------------------------------
|
793
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
794
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
800
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
806
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
812
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
813
|
+
---------------------------------
|
814
|
+
AwsElbHealthCheckTest: test_truth
|
815
|
+
---------------------------------
|
816
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
817
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
818
|
+
----------------------------------------------------------------
|
819
|
+
HealthCheckTest: test_should_get_success_when_secret_key_is_used
|
820
|
+
----------------------------------------------------------------
|
821
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
822
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
828
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
834
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
840
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
846
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
847
|
+
-----------------------------------------------------------------------------------
|
848
|
+
AwsElbHealthCheck::HealthCheckTest: test_should_get_success_when_secret_key_is_used
|
849
|
+
-----------------------------------------------------------------------------------
|
850
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
851
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
852
|
+
---------------------------------
|
853
|
+
AwsElbHealthCheckTest: test_truth
|
854
|
+
---------------------------------
|
855
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
856
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
862
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
868
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
874
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
875
|
+
---------------------------------
|
876
|
+
AwsElbHealthCheckTest: test_truth
|
877
|
+
---------------------------------
|
878
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
879
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
880
|
+
---------------------------------
|
881
|
+
AwsElbHealthCheckTest: test_truth
|
882
|
+
---------------------------------
|
883
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
884
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
890
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
896
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
905
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
914
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
924
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
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
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
933
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
934
|
+
---------------------------------
|
935
|
+
AwsElbHealthCheckTest: test_truth
|
936
|
+
---------------------------------
|
937
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
@@ -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.
|
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-
|
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/
|
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/
|
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
|