github.com/unigraph-dev/dgraph@v1.1.1-0.20200923154953-8b52b426f765/contrib/tlstest/Makefile (about)

     1  #
     2  # Copyright 2017-2018 Dgraph Labs, Inc. and Contributors
     3  #
     4  # Licensed under the Apache License, Version 2.0 (the "License");
     5  # you may not use this file except in compliance with the License.
     6  # You may obtain a copy of the License at
     7  #
     8  #     http://www.apache.org/licenses/LICENSE-2.0
     9  #
    10  # Unless required by applicable law or agreed to in writing, software
    11  # distributed under the License is distributed on an "AS IS" BASIS,
    12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  # See the License for the specific language governing permissions and
    14  # limitations under the License.
    15  #
    16  
    17  
    18  DGRAPH_PATH = $(GOPATH)/src/github.com/dgraph-io/dgraph/dgraph
    19  DGRAPH_BIN  = $(DGRAPH_PATH)/dgraph
    20  
    21  TARGETS     = test1 test2 test3 test4 test5 test6
    22  KEYBITS     = 2048
    23  
    24  .PHONY: all
    25  all: cert $(TARGETS)
    26  
    27  test: all
    28  
    29  cert:
    30  	@echo "Generating CA cert in 'tls' dir."
    31  	@$(MAKE) -C $(DGRAPH_PATH) all
    32  	@$(DGRAPH_BIN) cert --keysize $(KEYBITS) -d $(PWD)/tls -n localhost -c live
    33  
    34  test1: cert
    35  	@echo "Test 1: Alpha non-TLS, Live non-TLS"
    36  	@(DGRAPH_BIN=$(DGRAPH_BIN) ./test.sh ./alpha_notls.sh ./live_notls.sh 0)
    37  
    38  test2: cert
    39  	@echo "Test 2: Alpha non-TLS, Live TLS"
    40  	@(DGRAPH_BIN=$(DGRAPH_BIN) ./test.sh ./alpha_notls.sh ./live_tls.sh 1)
    41  
    42  test3: cert
    43  	@echo "Test 3: Alpha TLS, Live non-TLS"
    44  	@(DGRAPH_BIN=$(DGRAPH_BIN) ./test.sh ./alpha_tls.sh ./live_notls.sh 1)
    45  
    46  test4: cert
    47  	@echo "Test 4: Alpha TLS, Live TLS"
    48  	@(DGRAPH_BIN=$(DGRAPH_BIN) ./test.sh ./alpha_tls.sh ./live_tls.sh 0)
    49  
    50  test5: cert
    51  	@echo "Test 5: Alpha TLS Auth, Live TLS"
    52  	@(DGRAPH_BIN=$(DGRAPH_BIN) ./test.sh ./alpha_tls_auth.sh ./live_tls_auth.sh 0)
    53  
    54  test6: cert
    55  	@echo "Test 6: Alpha TLS reload, Live TLS"
    56  	@(DGRAPH_BIN=$(DGRAPH_BIN) RELOAD_TEST=1 ./test.sh ./alpha_tls.sh ./live_tls.sh 1)
    57  
    58  clean:
    59  	git clean -d -f
    60