Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests of invalid REST parameters. #95

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aaronweeden
Copy link
Contributor

@aaronweeden aaronweeden commented Sep 7, 2023

Description

This PR adds integration tests that test the validation of REST parameters that are obtained via the getParam() method of BaseControllerProvider.

This PR is based on #98. The diff between the PRs can be viewed here.

Tests performed

To run the tests, I did the following in a Docker container running tools-ext-01.ccr.xdmod.org/xdmod-10.5.0-x86_64:rockylinux8.5-0.3:

  1. Run the following commands:
    export COMPOSER_ALLOW_SUPERUSER=1
    export XDMOD_REALMS='jobs,storage,cloud'
    export XDMOD_ORG_NAME=aaronweeden
    export XDMOD_BRANCH=add-bool-and-float-param-tests
    export XDMOD_MODULE_NAME=appkernels
    export XDMOD_IS_CORE=yes
    export XDMOD_INSTALL_DIR=/xdmod
    export XDMOD_TEST_MODE=fresh_install
    dnf -y install --setopt=tsflags=nodocs python3
    openssl genrsa -rand /proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/uptime 2048 > /etc/pki/tls/private/localhost.key
    /usr/bin/openssl req -new -key /etc/pki/tls/private/localhost.key -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req -out /etc/pki/tls/certs/localhost.crt -subj "/C=XX/L=Default City/O=Default Company Ltd"
    git clone https://github.com/aaronweeden/xdmod-appkernels -b fix-rest-array-param-validation /xdmod-appkernels
    cd /xdmod-appkernels
    mkdir -p ./shippable/testresults
    export XDMOD_APPKERNELS_DIR=/xdmod-appkernels
    export XDMOD_SOURCE_DIR=/xdmod
    ./tests/runtests.sh
    cd tests/integration
    phpunit --debug .
    
  2. Confirm 161 tests, 549 assertions.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aaronweeden aaronweeden added this to the 11.0.0 milestone Sep 7, 2023
@aaronweeden aaronweeden changed the base branch from xdmod10.5 to xdmod11.0 October 6, 2023 00:50
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch from 86f3a49 to 8eaf152 Compare October 6, 2023 16:46
@aaronweeden aaronweeden added the qa label Dec 8, 2023
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch 6 times, most recently from d615af9 to 67826dc Compare December 8, 2023 22:36
@aaronweeden aaronweeden marked this pull request as ready for review December 11, 2023 20:02
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch 3 times, most recently from c86a526 to cabbfe0 Compare January 16, 2024 19:13
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch from cabbfe0 to cde368d Compare February 20, 2024 16:04
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch 2 times, most recently from 59d8f14 to a922b41 Compare May 6, 2024 12:58
@aaronweeden aaronweeden force-pushed the fix-rest-array-param-validation branch from a922b41 to 7762e97 Compare May 28, 2024 15:41
@aaronweeden aaronweeden removed this from the 11.0.0 milestone Jun 18, 2024
@aaronweeden aaronweeden changed the base branch from xdmod11.0 to main October 30, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant