re-import sources as agreed with the maintainer
This commit is contained in:
parent
34fe14baea
commit
bbe7d36bea
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,3 +1,9 @@
|
||||
SOURCES/gssntlmssp-0.7.0.tar.gz
|
||||
/gssntlmssp-0.1.0.tar.gz
|
||||
/gssntlmssp-0.2.0.tar.gz
|
||||
/gssntlmssp-0.3.0.tar.gz
|
||||
/gssntlmssp-0.3.1.tar.gz
|
||||
/gssntlmssp-0.4.0.tar.gz
|
||||
/gssntlmssp-0.5.0.tar.gz
|
||||
/gssntlmssp-0.6.0.tar.gz
|
||||
/gssntlmssp-0.7.0.tar.gz
|
||||
/gssntlmssp-1.2.0.tar.gz
|
||||
|
46
tests/first-test/Makefile
Normal file
46
tests/first-test/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
#
|
||||
# Author: Simo Sorce
|
||||
|
||||
TOPLEVEL_NAMESPACE=/CoreOS
|
||||
PACKAGE_NAME=gssntlmssp
|
||||
RELATIVE_PATH=first-test
|
||||
|
||||
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
|
||||
export TESTVERSION=1.0
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
BUILT_FILES=
|
||||
FILES=$(METADATA) runtest.sh Makefile gss.conf ntlmfile httpd.service
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x ./runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ *.rpm $(BUILT_FILES)
|
||||
|
||||
|
||||
# Include Common Makefile
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
# Generate the testinfo.desc here:
|
||||
$(METADATA): Makefile
|
||||
@touch $(METADATA)
|
||||
@echo $(PACKAGE_NAME)
|
||||
@echo "Owner: Simo Sorce <ssorce@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "License: GPL" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Description: Test gssntlmssp though mod_auth_gssapi and apache" >> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "Type: Install" >> $(METADATA)
|
||||
@echo "Requires: curl" >> $(METADATA)
|
||||
@echo "Requires: httpd" >> $(METADATA)
|
||||
@echo "Requires: mod_auth_gssapi" >> $(METADATA)
|
||||
@echo "Requires: gssntlmssp" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
2
tests/first-test/PURPOSE
Normal file
2
tests/first-test/PURPOSE
Normal file
@ -0,0 +1,2 @@
|
||||
This test sets up and verifies gssntlmssp via HTTPD and mod_auth_gssapi
|
||||
|
7
tests/first-test/gss.conf
Normal file
7
tests/first-test/gss.conf
Normal file
@ -0,0 +1,7 @@
|
||||
<Location /private>
|
||||
AuthType GSSAPI
|
||||
AuthName "NTLMSSP"
|
||||
GssapiAllowedMech ntlmssp
|
||||
GssapiConnectionBound on
|
||||
require valid-user
|
||||
</Location>
|
3
tests/first-test/httpd.service
Normal file
3
tests/first-test/httpd.service
Normal file
@ -0,0 +1,3 @@
|
||||
.include /lib/systemd/system/httpd.service
|
||||
[Service]
|
||||
Environment=NTLM_USER_FILE=/etc/httpd/ntlmfile
|
1
tests/first-test/ntlmfile
Normal file
1
tests/first-test/ntlmfile
Normal file
@ -0,0 +1 @@
|
||||
TESTDOM:testuser:testpassword
|
39
tests/first-test/runtest.sh
Executable file
39
tests/first-test/runtest.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author: Simo Sorce
|
||||
|
||||
. /usr/bin/rhts-environment.sh
|
||||
echo "rhts-environment sourced, status = $?"
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
echo "beakerlib sourced, status = $?"
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartSetup "Check than we have Apache"
|
||||
export PACKAGES="httpd mod_auth_gssapi gssntlmssp"
|
||||
rlAssertRpm --all
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartSetup "Setup httpd to use mod_auth_gssapi"
|
||||
rlRun "mkdir -p /var/www/html"
|
||||
rlRun "echo OK > /var/www/html/private"
|
||||
rlRun "cp gss.conf /etc/httpd/conf.d/gss.conf"
|
||||
rlRun "cp ntlmfile /etc/httpd/ntlmfile"
|
||||
rlRun "cp -f httpd.service /etc/systemd/system/httpd.service"
|
||||
rlRun "systemctl daemon-reload"
|
||||
rlRun "systemctl restart httpd"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "Run HTTP requests against the setup"
|
||||
export NTLM_USER_FILE=/etc/httpd/ntlmfile
|
||||
rlRun "curl -si http://$( hostname )/private > /tmp/curl.out.$$"
|
||||
rlAssertNotGrep "200 OK" /tmp/curl.out.$$
|
||||
rlRun "curl --negotiate -u : -si http://$( hostname )/private > /tmp/curl.out.$$"
|
||||
rlAssertGrep "200 OK" /tmp/curl.out.$$
|
||||
rlAssertGrep "^OK$" /tmp/curl.out.$$
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
|
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- first-test
|
||||
required_packages:
|
||||
- curl
|
||||
- httpd
|
||||
- mod_auth_gssapi
|
||||
|
Loading…
Reference in New Issue
Block a user