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

More fixes for AM18 #132

Merged
merged 6 commits into from
Oct 22, 2018
Merged

More fixes for AM18 #132

merged 6 commits into from
Oct 22, 2018

Conversation

sevein
Copy link
Member

@sevein sevein commented Oct 16, 2018

This pull request adds four commits including compatibility fixes for Archivematica 1.8 and some tweaks addressing issues running AMAUAT in our development environment based on Docker Compose.

These changes were tested using the following command available in our development environment:

$ make test-at-behave BROWSER=Firefox TAGS={tag}

Replace {tag} as needed. Other forms of executing AMAUAT should still work. Santiago is planning to run them from CI before the AM18 release.


Test results

Ready Tag Feature file (*.feature) Took (s)
✔️ mo-aip-reingest metadata-only-aip-reingest 5m15.179s
✔️ icc ingest-mkv-conformance 4m4.317s
✔️ ipc ingest-policy-check 19m19.609s
✔️ tpc transfer-policy-check 6m38.592
✔️ picc transfer-mkv-conformance 5m30.552
✔️ uuids-dirs uuids-for-directories 3m27.482
✔️ premis-events premis-events 10m1.949
✔️ pid-binding pid-binding 2m18.400
✔️ aip-encrypt-mirror aip-encryption-mirror 3m34.252s
✔️ aip-encrypt aip-encryption 16m3.705s

Issues found:

Connects to archivematica/Issues#193.

@sevein sevein added this to the 1.8.0 milestone Oct 16, 2018
@sevein sevein self-assigned this Oct 16, 2018
@sevein sevein force-pushed the dev/issue-193-amauat-am18x branch 4 times, most recently from 74ce110 to 0694ad2 Compare October 20, 2018 02:09
@sevein
Copy link
Member Author

sevein commented Oct 20, 2018

This is ready for code review. Under @aip-encrypt there is one scenario that is failing (archivematica/Issues#294) but that seems a problem in Archivematica not in AMAUAT.

Copy link
Contributor

@ross-spencer ross-spencer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions following CR @sevein. Otherwise it looks pretty good.

I haven't tried running these features yet. Are we expecting to run them on each of the test servers?

amuser/am_browser_ability.py Show resolved Hide resolved
@@ -88,7 +88,7 @@ def _navigate_to_transfer_directory_and_click(self, path):
# should be, i.e., this is now an absolute XPath.
folder_label_xpath = c.XPATH_TREEITEM_NEXT_SIBLING.join(xtrail)
# Wait until folder is visible.
block = WebDriverWait(self.driver, 3)
block = WebDriverWait(self.driver, 20)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be using the wait values from here:

# Generable, reusable wait times, in seconds
NIHILISTIC_WAIT = WAIT_FACTOR * 20
APATHETIC_WAIT = WAIT_FACTOR * 10
PESSIMISTIC_WAIT = WAIT_FACTOR * 5
MEDIUM_WAIT = WAIT_FACTOR * 3
OPTIMISTIC_WAIT = WAIT_FACTOR * 1
QUICK_WAIT = WAIT_FACTOR * 0.5
MICRO_WAIT = WAIT_FACTOR * 0.25
# Use-case-specific maximum attempt counters
MAX_CLICK_TRANSFER_DIRECTORY_ATTEMPTS = 5
MAX_CLICK_AIP_DIRECTORY_ATTEMPTS = 5
MAX_NAVIGATE_AIP_ARCHIVAL_STORAGE_ATTEMPTS = 10
MAX_DOWNLOAD_AIP_ATTEMPTS = 20
MAX_CHECK_AIP_STORED_ATTEMPTS = 60
MAX_CHECK_METS_LOADED_ATTEMPTS = 60
MAX_SEARCH_AIP_ARCHIVAL_STORAGE_ATTEMPTS = 120
MAX_SEARCH_DIP_BACKLOG_ATTEMPTS = 120
MAX_CHECK_TRANSFER_APPEARED_ATTEMPTS = 1000
MAX_CHECK_FOR_MS_GROUP_ATTEMPTS = 7200

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These names! 😆

amuser/am_browser_ability.py Show resolved Hide resolved
@@ -141,7 +141,7 @@ def _navigate_to_aip_directory_and_click(self, path):
is_last = True
self.cwd.append(folder)
folder_id = '_'.join(self.cwd)
block = WebDriverWait(self.driver, 1)
block = WebDriverWait(self.driver, 10)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise here.

# Generable, reusable wait times, in seconds
NIHILISTIC_WAIT = WAIT_FACTOR * 20
APATHETIC_WAIT = WAIT_FACTOR * 10
PESSIMISTIC_WAIT = WAIT_FACTOR * 5
MEDIUM_WAIT = WAIT_FACTOR * 3
OPTIMISTIC_WAIT = WAIT_FACTOR * 1
QUICK_WAIT = WAIT_FACTOR * 0.5
MICRO_WAIT = WAIT_FACTOR * 0.25
# Use-case-specific maximum attempt counters
MAX_CLICK_TRANSFER_DIRECTORY_ATTEMPTS = 5
MAX_CLICK_AIP_DIRECTORY_ATTEMPTS = 5
MAX_NAVIGATE_AIP_ARCHIVAL_STORAGE_ATTEMPTS = 10
MAX_DOWNLOAD_AIP_ATTEMPTS = 20
MAX_CHECK_AIP_STORED_ATTEMPTS = 60
MAX_CHECK_METS_LOADED_ATTEMPTS = 60
MAX_SEARCH_AIP_ARCHIVAL_STORAGE_ATTEMPTS = 120
MAX_SEARCH_DIP_BACKLOG_ATTEMPTS = 120
MAX_CHECK_TRANSFER_APPEARED_ATTEMPTS = 1000
MAX_CHECK_FOR_MS_GROUP_ATTEMPTS = 7200

amuser/am_browser_jobs_tasks_ability.py Show resolved Hide resolved
amuser/am_browser_transfer_ability.py Show resolved Hide resolved
access files in the application environment when they're local.
"""

# pylint: disable=R0201
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can mark this as @staticmethod instead of disabling pylint. Right now that's what it is, even if in future it becomes something else.

features/steps/aip_encryption_steps.py Show resolved Hide resolved
features/steps/steps.py Show resolved Hide resolved
features/steps/uuids_for_directories_steps.py Show resolved Hide resolved
This commit increases the default timeouts. This seems necessary when
using the marionette stack, otherwise different errors are returned
randomly at different points.
@ross-spencer
Copy link
Contributor

ross-spencer commented Oct 22, 2018

Hi @sevein

I am unable to get consistent results with testing at the moment (policy check), here are two failures (but on third attempt it passed):

First attempt: Unknown state, e.g. could have been after a few attempts and few other failed tests

sudo make test-at-behave BROWSER=Firefox TAGS=ipc
docker-compose -f docker-compose.yml -f docker-compose.acceptance-tests.yml  build archivematica-acceptance-tests
Building archivematica-acceptance-tests
Step 1/24 : FROM ubuntu:18.04
 ---> 735f80812f90
Step 2/24 : RUN echo "deb http://archive.ubuntu.com/ubuntu bionic main universe\n" > /etc/apt/sources.list 	&& echo "deb http://archive.ubuntu.com/ubuntu bionic-updates main universe\n" >> /etc/apt/sources.list 	&& echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe\n" >> /etc/apt/sources.list
 ---> Using cache
 ---> 9f614d9c2b77
Step 3/24 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 5e597fbb5b06
Step 4/24 : ENV DEBCONF_NONINTERACTIVE_SEEN=true
 ---> Using cache
 ---> c979c74dca4a
Step 5/24 : RUN apt-get -qqy update 	&& apt-get -qqy --no-install-recommends install 		gnupg 		bzip2 		ca-certificates 		tzdata 		sudo 		unzip 		curl 		wget 		git 		build-essential 		openssh-client 		p7zip-full 		python 		python3-pip 		python3-setuptools 		python3-dev 		libxml2-dev 		libxslt-dev 		zlib1g-dev 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
 ---> Using cache
 ---> bc73e3405f0a
Step 6/24 : ENV TZ "UTC"
 ---> Using cache
 ---> faad88a8b235
Step 7/24 : RUN echo "${TZ}" > /etc/timezone 	&& dpkg-reconfigure --frontend noninteractive tzdata
 ---> Using cache
 ---> 77c3713596df
Step 8/24 : RUN groupadd --gid 333 archivematica 	&& useradd --shell /bin/bash --groups sudo,archivematica --create-home artefactual 	&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers 	&& echo 'artefactual:secret' | chpasswd
 ---> Using cache
 ---> e9f607b66812
Step 9/24 : ARG CHROME_VERSION="google-chrome-beta"
 ---> Using cache
 ---> e5ec0d502bb2
Step 10/24 : RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 	&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list 	&& apt-get update -qqy 	&& apt-get -qqy install ${CHROME_VERSION:-google-chrome-stable} 	&& rm /etc/apt/sources.list.d/google-chrome.list 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
 ---> Using cache
 ---> 6f1dc12348d3
Step 11/24 : ARG CHROME_DRIVER_VERSION="latest"
 ---> Using cache
 ---> 54c42920c52a
Step 12/24 : RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE); else echo $CHROME_DRIVER_VERSION; fi) 	&& echo "Using chromedriver version: "$CD_VERSION 	&& wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CD_VERSION/chromedriver_linux64.zip 	&& rm -rf /opt/selenium/chromedriver 	&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium 	&& rm /tmp/chromedriver_linux64.zip 	&& mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CD_VERSION 	&& chmod 755 /opt/selenium/chromedriver-$CD_VERSION 	&& sudo ln -fs /opt/selenium/chromedriver-$CD_VERSION /usr/bin/chromedriver
 ---> Using cache
 ---> 8104c6f0edde
Step 13/24 : ARG FIREFOX_VERSION=62.0.3
 ---> Using cache
 ---> f2d418b62831
Step 14/24 : RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) 	&& apt-get update -qqy 	&& apt-get -qqy --no-install-recommends install firefox 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* 	&& wget --no-verbose -O /tmp/firefox.tar.bz2 $FIREFOX_DOWNLOAD_URL 	&& apt-get -y purge firefox 	&& rm -rf /opt/firefox 	&& tar -C /opt -xjf /tmp/firefox.tar.bz2 	&& rm /tmp/firefox.tar.bz2 	&& mv /opt/firefox /opt/firefox-$FIREFOX_VERSION 	&& ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox
 ---> Using cache
 ---> 8c860fb49fc2
Step 15/24 : ARG GECKODRIVER_VERSION=0.23.0
 ---> Using cache
 ---> 4d1e49df3a40
Step 16/24 : RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- "https://api.github.com/repos/mozilla/geckodriver/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([0-9.]+)".*/\1/'); else echo $GECKODRIVER_VERSION; fi) 	&& echo "Using GeckoDriver version: "$GK_VERSION 	&& wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GK_VERSION/geckodriver-v$GK_VERSION-linux64.tar.gz 	&& rm -rf /opt/geckodriver 	&& tar -C /opt -zxf /tmp/geckodriver.tar.gz 	&& rm /tmp/geckodriver.tar.gz 	&& mv /opt/geckodriver /opt/geckodriver-$GK_VERSION 	&& chmod 755 /opt/geckodriver-$GK_VERSION 	&& ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver
 ---> Using cache
 ---> b5f445d90ef7
Step 17/24 : COPY requirements /home/artefactual/acceptance-tests/requirements/
 ---> Using cache
 ---> 0855744da9a1
Step 18/24 : RUN pip3 install wheel 	&& pip3 install -r /home/artefactual/acceptance-tests/requirements/base.txt 	&& pip3 install -r /home/artefactual/acceptance-tests/requirements/test.txt
 ---> Using cache
 ---> 1deae05a46ef
Step 19/24 : COPY . /home/artefactual/acceptance-tests
 ---> Using cache
 ---> d0325b07d2ff
Step 20/24 : WORKDIR /home/artefactual/acceptance-tests
 ---> Using cache
 ---> e706fea509a7
Step 21/24 : RUN chown -R artefactual:artefactual /home/artefactual
 ---> Using cache
 ---> 832be3c18ad4
Step 22/24 : USER artefactual
 ---> Using cache
 ---> a6a49aeeca46
Step 23/24 : ENV HOME /home/artefactual
 ---> Using cache
 ---> dcee22bd63c6
Step 24/24 : ENV USER artefactual
 ---> Using cache
 ---> abff60f52933
Successfully built abff60f52933
Successfully tagged compose_archivematica-acceptance-tests:latest
docker-compose -f docker-compose.yml -f docker-compose.acceptance-tests.yml  run --rm -e HEADLESS=1 --no-deps archivematica-acceptance-tests /usr/local/bin/behave --tags=ipc --no-skipped -v --stop -D driver_name=Firefox -D ssh_accessible=no -D am_url=http://nginx/ -D am_username=test -D am_password=test -D am_api_key=test -D am_version=1.8 -D ss_url=http://nginx:8000/ -D ss_username=test -D ss_password=test -D ss_api_key=test -D transfer_source_path=archivematica/archivematica-sampledata/TestTransfers/acceptance-tests -D home=archivematica
Loading config defaults from "./tox.ini"
Loading config defaults from "./behave.ini"
Using defaults:
          color True
  show_snippets True
   show_skipped True
        dry_run False
    show_source True
   show_timings True
 stdout_capture False
 stderr_capture False
    log_capture True
 logging_format %(levelname)s:%(name)s:%(message)s
  logging_level 20
  steps_catalog False
        summary True
          junit False
          stage None
       userdata {}
 default_format pretty
   default_tags 
scenario_outline_annotation_schema {name} -- @{row.id} {examples.name}
more_formatters {}
Using default path "./features"
Trying base directory: /home/artefactual/acceptance-tests/features
@am17 @preforma @ipc
Feature: Ingest policy check # features/core/ingest-policy-check.feature:2
  Archivists want to check that the files that are defined for access or
  preservation conform to a pre-defined policy (or policies). The access and
  preservation derivatives may have been created by Archivematica through
  normalization or may have been predefined by the user prior to
  transfer.
  @access @nonmanual
  Scenario Outline: Isla has access derivatives and she needs to know whether they conform to her access policy -- @1.1 Policy Check Outcomes                           # features/core/ingest-policy-check.feature:28
    Given a processing configuration for policy checks on access derivatives                                                                                            # features/steps/mediaconch_steps.py:158 18.397s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/all-conform-policy-norm-acc contains files that, when normalized, will all conform to NYULib_MKVFFV1_MODIFIED.xml                            # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 4.570s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 13.769s
    And the user edits the FPR rule to transcode .mkv files to .mkv for access                                                                                          # features/steps/mediaconch_steps.py:232 12.057s
    And a transfer is initiated on directory preforma/all-conform-policy-norm-acc                                                                                       # features/steps/steps.py:381 33.701s
    And the user waits for the "Policy checks for access derivatives" micro-service to complete during ingest                                                           # features/steps/steps.py:207 38.860s
    Then the "Policy checks for access derivatives" micro-service output is "Completed successfully" during ingest                                                      # features/steps/steps.py:440 8.165s
    And all policy check for access derivatives tasks indicate pass                                                                                                     # features/steps/mediaconch_steps.py:448 0.001s
    When the user waits for the AIP to appear in archival storage                                                                                                       # features/steps/steps.py:235 27.568s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.036s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.065s
    Then the submissionDocumentation directory of the AIP does not contain a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                             # features/steps/mediaconch_steps.py:280 0.000s
[Errno 2] No such file or directory: '/tmp/tmpchch1sgc'
[Errno 2] No such file or directory: '/tmp/tmpqyluxpl0'

  @access @nonmanual
  Scenario Outline: Isla has access derivatives and she needs to know whether they conform to her access policy -- @1.2 Policy Check Outcomes                           # features/core/ingest-policy-check.feature:29
    Given a processing configuration for policy checks on access derivatives                                                                                            # features/steps/mediaconch_steps.py:158 17.291s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/none-conform-policy-norm-acc contains files that, when normalized, will all not conform to NYULib_MKVFFV1_MODIFIED.xml                       # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.457s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 16.113s
    And the user edits the FPR rule to transcode .mkv files to .mkv for access                                                                                          # features/steps/mediaconch_steps.py:232 15.060s
    And a transfer is initiated on directory preforma/none-conform-policy-norm-acc                                                                                      # features/steps/steps.py:381 42.495s
    And the user waits for the "Policy checks for access derivatives" micro-service to complete during ingest                                                           # features/steps/steps.py:207 32.498s
    Then the "Policy checks for access derivatives" micro-service output is "Failed" during ingest                                                                      # features/steps/steps.py:440 9.018s
    And all policy check for access derivatives tasks indicate fail                                                                                                     # features/steps/mediaconch_steps.py:448 0.000s
    When the user waits for the AIP to appear in archival storage                                                                                                       # features/steps/steps.py:235 32.645s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.364s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.287s
    Then the submissionDocumentation directory of the AIP does not contain a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                             # features/steps/mediaconch_steps.py:280 0.000s
[Errno 2] No such file or directory: '/tmp/tmpw7or7ul4'
[Errno 2] No such file or directory: '/tmp/tmpmojoc08s'

  @preservation @nonmanual
  Scenario Outline: Isla has preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.1 Policy Check Outcomes               # features/core/ingest-policy-check.feature:55
    Given a processing configuration for policy checks on preservation derivatives                                                                                      # features/steps/mediaconch_steps.py:99 18.082s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/all-conform-policy contains files that, when normalized, will all conform to NYULib_MKVFFV1_MODIFIED.xml                                     # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.419s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 16.853s
    And a transfer is initiated on directory preforma/all-conform-policy                                                                                                # features/steps/steps.py:381 47.788s
    And the user waits for the "Policy checks for preservation derivatives" micro-service to complete during ingest                                                     # features/steps/steps.py:207 21.190s
    Then the "Policy checks for preservation derivatives" micro-service output is "Completed successfully" during ingest                                                # features/steps/steps.py:440 9.908s
    When the user waits for the "Store AIP (review)" decision point to appear during ingest                                                                             # features/steps/steps.py:214 12.200s
    Then all PREMIS policy-check-type validation events have eventOutcome = pass                                                                                        # features/steps/mediaconch_steps.py:478 14.890s
    When the user chooses "Store AIP" at decision point "Store AIP (review)" during ingest                                                                              # features/steps/steps.py:229 2.855s
    And the user waits for the AIP to appear in archival storage                                                                                                        # features/steps/steps.py:235 17.233s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.054s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.083s
    Then the submissionDocumentation directory of the AIP contains a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                                     # features/steps/mediaconch_steps.py:280 0.000s
    And the logs directory of the AIP contains a MediaConch policy check output file for each policy file tested against NYULib_MKVFFV1_MODIFIED.xml                    # features/steps/mediaconch_steps.py:366 0.001s
[Errno 2] No such file or directory: '/tmp/tmpqw5yvygo'
[Errno 2] No such file or directory: '/tmp/tmp2ct2g8gp'
[Errno 2] No such file or directory: '/tmp/tmp3ibqeixt'

  @preservation @nonmanual
  Scenario Outline: Isla has preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.2 Policy Check Outcomes               # features/core/ingest-policy-check.feature:56
    Given a processing configuration for policy checks on preservation derivatives                                                                                      # features/steps/mediaconch_steps.py:99 16.768s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/none-conform-policy contains files that, when normalized, will all not conform to NYULib_MKVFFV1_MODIFIED.xml                                # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.497s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 21.912s
    And a transfer is initiated on directory preforma/none-conform-policy                                                                                               # features/steps/steps.py:381 53.458s
    And the user waits for the "Policy checks for preservation derivatives" micro-service to complete during ingest                                                     # features/steps/steps.py:207 18.152s
    Then the "Policy checks for preservation derivatives" micro-service output is "Failed" during ingest                                                                # features/steps/steps.py:440 9.724s
    When the user waits for the "Store AIP (review)" decision point to appear during ingest                                                                             # features/steps/steps.py:214 11.874s
    Then all PREMIS policy-check-type validation even    Then all PREMIS policy-check-type validation events have eventOutcome = fail                                                                                        # features/steps/mediaconch_steps.py:478 13.234s
    When the user chooses "Store AIP" at decision point "Store AIP (review)" during ingest                                                                              # features/steps/steps.py:229 2.877s
    And the user waits for the AIP to appear in archival storage                                                                                                        # features/steps/steps.py:235 17.164s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 48.555s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.369s
    Then the submissionDocumentation directory of the AIP contains a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                                     # features/steps/mediaconch_steps.py:280 0.001s
    And the logs directory of the AIP contains a MediaConch policy check output file for each policy file tested against NYULib_MKVFFV1_MODIFIED.xml                    # features/steps/mediaconch_steps.py:366 0.001s
[Errno 2] No such file or directory: '/tmp/tmp0mv9qkm6'
[Errno 2] No such file or directory: '/tmp/tmpsu84ezeu'
[Errno 2] No such file or directory: '/tmp/tmpqc191mcb'

  @preservation @manual
  Scenario Outline: Isla has manually normalized preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.1 Policy Check Outcomes                                          # features/core/ingest-policy-check.feature:82
    Given a processing configuration for policy checks on preservation derivatives                                                                                                                                     # features/steps/mediaconch_steps.py:99 20.600s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                                                                  # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/manually-normalized-preservation-all-conform-policy/manualNormalization/preservation/ contains a file manually normalized for preservation that will conform to NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:203 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                                                                    # features/steps/mediaconch_steps.py:252 0.602s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml                                                # features/steps/mediaconch_steps.py:261 19.290s
    And a transfer is initiated on directory preforma/manually-normalized-preservation-all-conform-policy                                                                                                              # features/steps/steps.py:381 41.426s
    And the user waits for the "Policy checks for preservation derivatives" micro-service to complete during ingest                                                                                                    # features/steps/steps.py:207 34.012s
      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/dist-packages/behave/model.py", line 1329, in run
          match.run(runner.context)
        File "/usr/local/lib/python3.6/dist-packages/behave/matchers.py", line 98, in run
          self.func(context, *args, **kwargs)
        File "features/steps/steps.py", line 211, in step_impl
          unit_type)
        File "/home/artefactual/acceptance-tests/features/steps/utils.py", line 21, in wait_for_micro_service_to_complete
          microservice_name, uuid_val, unit_type=unit_type)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 38, in await_job_completion
          ms_name, group_name = self.expose_job(ms_name, transfer_uuid, unit_type)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_jobs_tasks_ability.py", line 61, in expose_job
          ms_name, group_name, transfer_uuid)
        File "/home/artefactual/acceptance-tests/amuser/selenium_ability.py", line 171, in wrapper
          return func(*args, **kwargs)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 124, in wait_for_microservice_visibility
          group_name, transfer_uuid)
        File "/home/artefactual/acceptance-tests/amuser/selenium_ability.py", line 171, in wrapper
          return func(*args, **kwargs)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 179, in get_transfer_micro_service_group_elem
          for elem in self.driver.find_elements_by_css_selector('div.sip'):
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 613, in find_elements_by_css_selector
          return self.find_elements(by=By.CSS_SELECTOR, value=css_selector)
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 995, in find_elements
          'value': value})['value'] or []
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
          self.error_handler.check_response(response)
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
          raise exception_class(message, screen, stacktrace)
      selenium.common.exceptions.WebDriverException: Message: Failed to interpret value as array
      
      
      Captured logging:
      INFO:amuser.preservationplanning:Ensuring there is an FPR validation command that checks a file against the policy file named "NYULib_MKVFFV1_MODIFIED.xml".
      INFO:amuser.preservationplanning:The policy command already exists; no need to re-create it.
      INFO:amuser.preservationplanning:Ensuring there is an FPR rule with purpose "Validation against a policy" that runs command "Check against policy NYULib_MKVFFV1_MODIFIED.xml using MediaConch" against files with format "Video: Matroska: Generic MKV (fmt/569)".
      INFO:amuser.preservationplanning:Creating the needed FPR rule.
      INFO:amuser.preservationplanning:Created the needed FPR rule.
      INFO:amuser.fileexplorer:Clicking on "archivematica"
      INFO:amuser.fileexplorer:Clicking to open folder "archivematica"
      INFO:amuser.fileexplorer:Clicked to open folder "archivematica"
      INFO:amuser.fileexplorer:Clicking on "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicking to open folder "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicked to open folder "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicking on "TestTransfers"
      INFO:amuser.fileexplorer:Clicking to open folder "TestTransfers"
      INFO:amuser.fileexplorer:Clicked to open folder "TestTransfers"
      INFO:amuser.fileexplorer:Clicking on "acceptance-tests"
      INFO:amuser.fileexplorer:Clicking to open folder "acceptance-tests"
      INFO:amuser.fileexplorer:Clicked to open folder "acceptance-tests"
      INFO:amuser.fileexplorer:Clicking on "preforma"
      INFO:amuser.fileexplorer:Clicking to open folder "preforma"
      INFO:amuser.fileexplorer:Clicked to open folder "preforma"
      INFO:amuser.fileexplorer:Clicking on "manually-normalized-preservation-all-conform-policy"
      INFO:amuser.fileexplorer:Clicking to select folder "manually-normalized-preservation-all-conform-policy"
      INFO:amuser.fileexplorer:Attempting to click folder element at offset 0.
      INFO:amuser.fileexplorer:The Add button has become clickable.
      INFO:amuser.fileexplorer:Clicked to select folder "manually-normalized-preservation-all-conform-policy"
      INFO:amuser.transfer:Changed transfer name from manually_normalized_preservation_all_conform_policy_1540214543 to manually_normalized_preservation_all_conform_policy_1540214543
      INFO:amuser.ingest:Getting SIP UUID from transfer name manually_normalized_preservation_all_conform_policy_1540214543
      INFO:amuser.transfer:Changed transfer name from manually_normalized_preservation_all_conform_policy_1540214543 to manually_normalized_preservation_all_conform_policy_1540214543
      INFO:amuser.ingest:Got SIP UUID b50515b1-fcba-43f1-9a24-2848532b3d43
      INFO:amuser.jobstasks:exposing job Policy checks for preservation derivatives
      INFO:amuser.jobstasks:expecting job Policy checks for preservation derivatives to be in group Policy checks for derivatives
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"

[Errno 2] No such file or directory: '/tmp/tmpqs8iw3mb'
    Then the "Policy checks for preservation derivatives" micro-service output is "Completed successfully" during ingest                                                                                               # None
    When the user waits for the "Store AIP (review)" decision point to appear during ingest                                                                                                                            # None
    Then all PREMIS policy-check-type validation events have eventOutcome = pass                                                                                                                                       # None
    When the user chooses "Store AIP" at decision point "Store AIP (review)" during ingest                                                                                                                             # None
    And the user waits for the AIP to appear in archival storage                                                                                                                                                       # None
    And the user downloads the AIP                                                                                                                                                                                     # None
    And the user decompresses the AIP                                                                                                                                                                                  # None
    Then the submissionDocumentation directory of the AIP contains a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                                                                                    # None
    And the logs directory of the AIP contains a MediaConch policy check output file for each policy file tested against NYULib_MKVFFV1_MODIFIED.xml                                                                   # None


Failing scenarios:
  features/core/ingest-policy-check.feature:82  Isla has manually normalized preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.1 Policy Check Outcomes

8 features passed, 1 failed, 8 skipped, 3 untested
4 scenarios passed, 1 failed, 20 skipped, 27 untested
66 steps passed, 1 failed, 183 skipped, 0 undefined, 308 untested
Took 13m35.490s
Makefile:164: recipe for target 'test-at-behave' failed
make: *** [test-at-behave] Error 1

After bootstrap-dashboard-db and restart-am-services:

sudo make test-at-behave BROWSER=Firefox TAGS=ipc
docker-compose -f docker-compose.yml -f docker-compose.acceptance-tests.yml  build archivematica-acceptance-tests
Building archivematica-acceptance-tests
Step 1/24 : FROM ubuntu:18.04
 ---> 735f80812f90
Step 2/24 : RUN echo "deb http://archive.ubuntu.com/ubuntu bionic main universe\n" > /etc/apt/sources.list 	&& echo "deb http://archive.ubuntu.com/ubuntu bionic-updates main universe\n" >> /etc/apt/sources.list 	&& echo "deb http://security.ubuntu.com/ubuntu bionic-security main universe\n" >> /etc/apt/sources.list
 ---> Using cache
 ---> 9f614d9c2b77
Step 3/24 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 5e597fbb5b06
Step 4/24 : ENV DEBCONF_NONINTERACTIVE_SEEN=true
 ---> Using cache
 ---> c979c74dca4a
Step 5/24 : RUN apt-get -qqy update 	&& apt-get -qqy --no-install-recommends install 		gnupg 		bzip2 		ca-certificates 		tzdata 		sudo 		unzip 		curl 		wget 		git 		build-essential 		openssh-client 		p7zip-full 		python 		python3-pip 		python3-setuptools 		python3-dev 		libxml2-dev 		libxslt-dev 		zlib1g-dev 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
 ---> Using cache
 ---> bc73e3405f0a
Step 6/24 : ENV TZ "UTC"
 ---> Using cache
 ---> faad88a8b235
Step 7/24 : RUN echo "${TZ}" > /etc/timezone 	&& dpkg-reconfigure --frontend noninteractive tzdata
 ---> Using cache
 ---> 77c3713596df
Step 8/24 : RUN groupadd --gid 333 archivematica 	&& useradd --shell /bin/bash --groups sudo,archivematica --create-home artefactual 	&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers 	&& echo 'artefactual:secret' | chpasswd
 ---> Using cache
 ---> e9f607b66812
Step 9/24 : ARG CHROME_VERSION="google-chrome-beta"
 ---> Using cache
 ---> e5ec0d502bb2
Step 10/24 : RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 	&& echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list 	&& apt-get update -qqy 	&& apt-get -qqy install ${CHROME_VERSION:-google-chrome-stable} 	&& rm /etc/apt/sources.list.d/google-chrome.list 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
 ---> Using cache
 ---> 6f1dc12348d3
Step 11/24 : ARG CHROME_DRIVER_VERSION="latest"
 ---> Using cache
 ---> 54c42920c52a
Step 12/24 : RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE); else echo $CHROME_DRIVER_VERSION; fi) 	&& echo "Using chromedriver version: "$CD_VERSION 	&& wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CD_VERSION/chromedriver_linux64.zip 	&& rm -rf /opt/selenium/chromedriver 	&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium 	&& rm /tmp/chromedriver_linux64.zip 	&& mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CD_VERSION 	&& chmod 755 /opt/selenium/chromedriver-$CD_VERSION 	&& sudo ln -fs /opt/selenium/chromedriver-$CD_VERSION /usr/bin/chromedriver
 ---> Using cache
 ---> 8104c6f0edde
Step 13/24 : ARG FIREFOX_VERSION=62.0.3
 ---> Using cache
 ---> f2d418b62831
Step 14/24 : RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) 	&& apt-get update -qqy 	&& apt-get -qqy --no-install-recommends install firefox 	&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* 	&& wget --no-verbose -O /tmp/firefox.tar.bz2 $FIREFOX_DOWNLOAD_URL 	&& apt-get -y purge firefox 	&& rm -rf /opt/firefox 	&& tar -C /opt -xjf /tmp/firefox.tar.bz2 	&& rm /tmp/firefox.tar.bz2 	&& mv /opt/firefox /opt/firefox-$FIREFOX_VERSION 	&& ln -fs /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox
 ---> Using cache
 ---> 8c860fb49fc2
Step 15/24 : ARG GECKODRIVER_VERSION=0.23.0
 ---> Using cache
 ---> 4d1e49df3a40
Step 16/24 : RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- "https://api.github.com/repos/mozilla/geckodriver/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([0-9.]+)".*/\1/'); else echo $GECKODRIVER_VERSION; fi) 	&& echo "Using GeckoDriver version: "$GK_VERSION 	&& wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GK_VERSION/geckodriver-v$GK_VERSION-linux64.tar.gz 	&& rm -rf /opt/geckodriver 	&& tar -C /opt -zxf /tmp/geckodriver.tar.gz 	&& rm /tmp/geckodriver.tar.gz 	&& mv /opt/geckodriver /opt/geckodriver-$GK_VERSION 	&& chmod 755 /opt/geckodriver-$GK_VERSION 	&& ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver
 ---> Using cache
 ---> b5f445d90ef7
Step 17/24 : COPY requirements /home/artefactual/acceptance-tests/requirements/
 ---> Using cache
 ---> 0855744da9a1
Step 18/24 : RUN pip3 install wheel 	&& pip3 install -r /home/artefactual/acceptance-tests/requirements/base.txt 	&& pip3 install -r /home/artefactual/acceptance-tests/requirements/test.txt
 ---> Using cache
 ---> 1deae05a46ef
Step 19/24 : COPY . /home/artefactual/acceptance-tests
 ---> Using cache
 ---> d0325b07d2ff
Step 20/24 : WORKDIR /home/artefactual/acceptance-tests
 ---> Using cache
 ---> e706fea509a7
Step 21/24 : RUN chown -R artefactual:artefactual /home/artefactual
 ---> Using cache
 ---> 832be3c18ad4
Step 22/24 : USER artefactual
 ---> Using cache
 ---> a6a49aeeca46
Step 23/24 : ENV HOME /home/artefactual
 ---> Using cache
 ---> dcee22bd63c6
Step 24/24 : ENV USER artefactual
 ---> Using cache
 ---> abff60f52933
Successfully built abff60f52933
Successfully tagged compose_archivematica-acceptance-tests:latest
docker-compose -f docker-compose.yml -f docker-compose.acceptance-tests.yml  run --rm -e HEADLESS=1 --no-deps archivematica-acceptance-tests /usr/local/bin/behave --tags=ipc --no-skipped -v --stop -D driver_name=Firefox -D ssh_accessible=no -D am_url=http://nginx/ -D am_username=test -D am_password=test -D am_api_key=test -D am_version=1.8 -D ss_url=http://nginx:8000/ -D ss_username=test -D ss_password=test -D ss_api_key=test -D transfer_source_path=archivematica/archivematica-sampledata/TestTransfers/acceptance-tests -D home=archivematica
Loading config defaults from "./tox.ini"
Loading config defaults from "./behave.ini"
Using defaults:
          color True
  show_snippets True
   show_skipped True
        dry_run False
    show_source True
   show_timings True
 stdout_capture False
 stderr_capture False
    log_capture True
 logging_format %(levelname)s:%(name)s:%(message)s
  logging_level 20
  steps_catalog False
        summary True
          junit False
          stage None
       userdata {}
 default_format pretty
   default_tags 
scenario_outline_annotation_schema {name} -- @{row.id} {examples.name}
more_formatters {}
Using default path "./features"
Trying base directory: /home/artefactual/acceptance-tests/features
@am17 @preforma @ipc
Feature: Ingest policy check # features/core/ingest-policy-check.feature:2
  Archivists want to check that the files that are defined for access or
  preservation conform to a pre-defined policy (or policies). The access and
  preservation derivatives may have been created by Archivematica through
  normalization or may have been predefined by the user prior to
  transfer.
  @access @nonmanual
  Scenario Outline: Isla has access derivatives and she needs to know whether they conform to her access policy -- @1.1 Policy Check Outcomes                           # features/core/ingest-policy-check.feature:28
    Given a processing configuration for policy checks on access derivatives                                                                                            # features/steps/mediaconch_steps.py:158 17.490s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/all-conform-policy-norm-acc contains files that, when normalized, will all conform to NYULib_MKVFFV1_MODIFIED.xml                            # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 4.646s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 13.948s
    And the user edits the FPR rule to transcode .mkv files to .mkv for access                                                                                          # features/steps/mediaconch_steps.py:232 12.089s
    And a transfer is initiated on directory preforma/all-conform-policy-norm-acc                                                                                       # features/steps/steps.py:381 41.855s
    And the user waits for the "Policy checks for access derivatives" micro-service to complete during ingest                                                           # features/steps/steps.py:207 27.827s
    Then the "Policy checks for access derivatives" micro-service output is "Completed successfully" during ingest                                                      # features/steps/steps.py:440 8.116s
    And all policy check for access derivatives tasks indicate pass                                                                                                     # features/steps/mediaconch_steps.py:448 0.000s
    When the user waits for the AIP to appear in archival storage                                                                                                       # features/steps/steps.py:235 37.271s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.060s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.061s
    Then the submissionDocumentation directory of the AIP does not contain a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                             # features/steps/mediaconch_steps.py:280 0.000s
[Errno 2] No such file or directory: '/tmp/tmpddcxbfrl'
[Errno 2] No such file or directory: '/tmp/tmp6hvmsjli'

  @access @nonmanual
  Scenario Outline: Isla has access derivatives and she needs to know whether they conform to her access policy -- @1.2 Policy Check Outcomes                           # features/core/ingest-policy-check.feature:29
    Given a processing configuration for policy checks on access derivatives                                                                                            # features/steps/mediaconch_steps.py:158 17.688s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/none-conform-policy-norm-acc contains files that, when normalized, will all not conform to NYULib_MKVFFV1_MODIFIED.xml                       # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.430s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 15.965s
    And the user edits the FPR rule to transcode .mkv files to .mkv for access                                                                                          # features/steps/mediaconch_steps.py:232 13.011s
    And a transfer is initiated on directory preforma/none-conform-policy-norm-acc                                                                                      # features/steps/steps.py:381 34.537s
    And the user waits for the "Policy checks for access derivatives" micro-service to complete during ingest                                                           # features/steps/steps.py:207 39.523s
    Then the "Policy checks for access derivatives" micro-service output is "Failed" during ingest                                                                      # features/steps/steps.py:440 9.074s
    And all policy check for access derivatives tasks indicate fail                                                                                                     # features/steps/mediaconch_steps.py:448 0.000s
    When the user waits for the AIP to appear in archival storage                                                                                                       # features/steps/steps.py:235 27.145s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.338s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.413s
    Then the submissionDocumentation directory of the AIP does not contain a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                             # features/steps/mediaconch_steps.py:280 0.001s
[Errno 2] No such file or directory: '/tmp/tmpi6vqmqh7'
[Errno 2] No such file or directory: '/tmp/tmp_r2nnwmx'

  @preservation @nonmanual
  Scenario Outline: Isla has preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.1 Policy Check Outcomes               # features/core/ingest-policy-check.feature:55
    Given a processing configuration for policy checks on preservation derivatives                                                                                      # features/steps/mediaconch_steps.py:99 17.313s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/all-conform-policy contains files that, when normalized, will all conform to NYULib_MKVFFV1_MODIFIED.xml                                     # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.580s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 16.693s
    And a transfer is initiated on directory preforma/all-conform-policy                                                                                                # features/steps/steps.py:381 47.606s
    And the user waits for the "Policy checks for preservation derivatives" micro-service to complete during ingest                                                     # features/steps/steps.py:207 28.328s
    Then the "Policy checks for preservation derivatives" micro-service output is "Completed successfully" during ingest                                                # features/steps/steps.py:440 9.232s
    When the user waits for the "Store AIP (review)" decision point to appear during ingest                                                                             # features/steps/steps.py:214 7.153s
    Then all PREMIS policy-check-type validation events have eventOutcome = pass                                                                                        # features/steps/mediaconch_steps.py:478 13.476s
    When the user chooses "Store AIP" at decision point "Store AIP (review)" during ingest                                                                              # features/steps/steps.py:229 2.863s
    And the user waits for the AIP to appear in archival storage                                                                                                        # features/steps/steps.py:235 17.091s
    And the user downloads the AIP                                                                                                                                      # features/steps/steps.py:253 0.067s
    And the user decompresses the AIP                                                                                                                                   # features/steps/steps.py:308 0.132s
    Then the submissionDocumentation directory of the AIP contains a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                                     # features/steps/mediaconch_steps.py:280 0.001s
    And the logs directory of the AIP contains a MediaConch policy check output file for each policy file tested against NYULib_MKVFFV1_MODIFIED.xml                    # features/steps/mediaconch_steps.py:366 0.001s
[Errno 2] No such file or directory: '/tmp/tmpay9edby8'
[Errno 2] No such file or directory: '/tmp/tmpd9k647mt'
[Errno 2] No such file or directory: '/tmp/tmpthua97ie'

  @preservation @nonmanual
  Scenario Outline: Isla has preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.2 Policy Check Outcomes               # features/core/ingest-policy-check.feature:56
    Given a processing configuration for policy checks on preservation derivatives                                                                                      # features/steps/mediaconch_steps.py:99 16.451s
    And MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml is present in the local etc/mediaconch-policies/ directory                                                   # features/steps/mediaconch_steps.py:191 0.000s
    And directory preforma/none-conform-policy contains files that, when normalized, will all not conform to NYULib_MKVFFV1_MODIFIED.xml                                # features/steps/mediaconch_steps.py:197 0.000s
    When the user ensures there is an FPR command that uses policy file NYULib_MKVFFV1_MODIFIED.xml                                                                     # features/steps/mediaconch_steps.py:252 0.397s
    And the user ensures there is an FPR rule with purpose Validation against a policy that validates Generic MKV files against policy file NYULib_MKVFFV1_MODIFIED.xml # features/steps/mediaconch_steps.py:261 15.984s
    And a transfer is initiated on directory preforma/none-conform-policy                                                                                               # features/steps/steps.py:381 48.506s
    And the user waits for the "Policy checks for pre    And the user waits for the "Policy checks for preservation derivatives" micro-service to complete during ingest                                                     # features/steps/steps.py:207 22.094s
    Then the "Policy checks for preservation derivatives" micro-service output is "Failed" during ingest                                                                # features/steps/steps.py:440 10.481s
    When the user waits for the "Store AIP (review)" decision point to appear during ingest                                                                             # features/steps/steps.py:214 13.245s
    Then all PREMIS policy-check-type validation events have eventOutcome = fail                                                                                        # features/steps/mediaconch_steps.py:478 13.348s
    When the user chooses "Store AIP" at decision point "Store AIP (review)" during ingest                                                                              # features/steps/steps.py:229 2.266s
      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/dist-packages/behave/model.py", line 1329, in run
          match.run(runner.context)
        File "/usr/local/lib/python3.6/dist-packages/behave/matchers.py", line 98, in run
          self.func(context, *args, **kwargs)
        File "features/steps/steps.py", line 232, in step_impl
          utils.make_choice(context, choice, decision_point, unit_type)
        File "/home/artefactual/acceptance-tests/features/steps/utils.py", line 36, in make_choice
          choice, decision_point, uuid_val, unit_type=unit_type)
        File "/home/artefactual/acceptance-tests/amuser/selenium_ability.py", line 171, in wrapper
          return func(*args, **kwargs)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 65, in make_choice
          decision_point, uuid_val, unit_type=unit_type)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_jobs_tasks_ability.py", line 52, in expose_job
          self.wait_for_transfer_micro_service_group(group_name, transfer_uuid)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 166, in wait_for_transfer_micro_service_group
          group_name, transfer_uuid)
        File "/home/artefactual/acceptance-tests/amuser/selenium_ability.py", line 171, in wrapper
          return func(*args, **kwargs)
        File "/home/artefactual/acceptance-tests/amuser/am_browser_transfer_ingest_ability.py", line 179, in get_transfer_micro_service_group_elem
          for elem in self.driver.find_elements_by_css_selector('div.sip'):
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 613, in find_elements_by_css_selector
          return self.find_elements(by=By.CSS_SELECTOR, value=css_selector)
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 995, in find_elements
          'value': value})['value'] or []
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
          self.error_handler.check_response(response)
        File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
          raise exception_class(message, screen, stacktrace)
      selenium.common.exceptions.WebDriverException: Message: Failed to decode response from marionette
      
      
      Captured logging:
      INFO:amuser.preservationplanning:Ensuring there is an FPR validation command that checks a file against the policy file named "NYULib_MKVFFV1_MODIFIED.xml".
      INFO:amuser.preservationplanning:The policy command already exists; no need to re-create it.
      INFO:amuser.preservationplanning:Ensuring there is an FPR rule with purpose "Validation against a policy" that runs command "Check against policy NYULib_MKVFFV1_MODIFIED.xml using MediaConch" against files with format "Video: Matroska: Generic MKV (fmt/569)".
      INFO:amuser.preservationplanning:Creating the needed FPR rule.
      INFO:amuser.preservationplanning:Created the needed FPR rule.
      INFO:amuser.fileexplorer:Clicking on "archivematica"
      INFO:amuser.fileexplorer:Clicking to open folder "archivematica"
      INFO:amuser.fileexplorer:Clicked to open folder "archivematica"
      INFO:amuser.fileexplorer:Clicking on "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicking to open folder "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicked to open folder "archivematica-sampledata"
      INFO:amuser.fileexplorer:Clicking on "TestTransfers"
      INFO:amuser.fileexplorer:Clicking to open folder "TestTransfers"
      INFO:amuser.fileexplorer:Clicked to open folder "TestTransfers"
      INFO:amuser.fileexplorer:Clicking on "acceptance-tests"
      INFO:amuser.fileexplorer:Clicking to open folder "acceptance-tests"
      INFO:amuser.fileexplorer:Clicked to open folder "acceptance-tests"
      INFO:amuser.fileexplorer:Clicking on "preforma"
      INFO:amuser.fileexplorer:Clicking to open folder "preforma"
      INFO:amuser.fileexplorer:Clicked to open folder "preforma"
      INFO:amuser.fileexplorer:Clicking on "none-conform-policy"
      INFO:amuser.fileexplorer:Clicking to select folder "none-conform-policy"
      INFO:amuser.fileexplorer:Attempting to click folder element at offset 0.
      INFO:amuser.fileexplorer:The Add button has not become clickable.
      INFO:amuser.fileexplorer:Attempting to click folder element at offset 100.
      INFO:amuser.fileexplorer:The Add button has not become clickable.
      INFO:amuser.fileexplorer:Attempting to click folder element at offset 200.
      INFO:amuser.fileexplorer:The Add button has become clickable.
      INFO:amuser.fileexplorer:Clicked to select folder "none-conform-policy"
      INFO:amuser.transfer:Changed transfer name from none_conform_policy_1540216522 to none_conform_policy_1540216522
      INFO:amuser.ingest:Getting SIP UUID from transfer name none_conform_policy_1540216522
      INFO:amuser.transfer:Changed transfer name from none_conform_policy_1540216522 to none_conform_policy_1540216522
      INFO:amuser.ingest:Got SIP UUID 02986424-9c4a-4636-9845-6a1f7126b2ef
      INFO:amuser.jobstasks:exposing job Policy checks for preservation derivatives
      INFO:amuser.jobstasks:expecting job Policy checks for preservation derivatives to be in group Policy checks for derivatives
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.jobstasks:exposed job Policy checks for preservation derivatives (Policy checks for derivatives)
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.jobstasks:exposing job Policy checks for preservation derivatives
      INFO:amuser.jobstasks:expecting job Policy checks for preservation derivatives to be in group Policy checks for derivatives
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.jobstasks:exposed job Policy checks for preservation derivatives (Policy checks for derivatives)
      INFO:amuser.transferingest:DOM name "Microservice: Policy checks for derivatives" MATCHES expected name "Microservice: Policy checks for derivatives"
      INFO:amuser.utils:Treating microservice "Store AIP (review)" as "Store AIP Review"
      INFO:amuser.transferingest:Await decision point "Store AIP Review" with unit 02986424-9c4a-4636-9845-6a1f7126b2ef of type sip
      INFO:amuser.jobstasks:exposing job Store AIP Review
      INFO:amuser.jobstasks:expecting job Store AIP Review to be in group Store AIP
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.jobstasks:exposed job Store AIP Review (Store AIP)
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.ingest:Getting SIP UUID from transfer name none_conform_policy_1540216522
      INFO:amuser.transfer:Changed transfer name from none_conform_policy_1540216522 to none_conform_policy_1540216522
      INFO:amuser.ingest:Got SIP UUID 02986424-9c4a-4636-9845-6a1f7126b2ef
      INFO:amuser.utils:Treating microservice "Store AIP (review)" as "Store AIP Review"
      INFO:amuser.jobstasks:exposing job Store AIP Review
      INFO:amuser.jobstasks:expecting job Store AIP Review to be in group Store AIP
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.transferingest:DOM name "Microservice: Store AIP" MATCHES expected name "Microservice: Store AIP"
      INFO:amuser.jobstasks:exposed job Store AIP Review (Store AIP)
      INFO:amuser.selenium:Previously we had 1 window handles, now we have 2
      INFO:amuser.utils:Treating microservice "Store AIP (review)" as "Store AIP Review"
      INFO:amuser.jobstasks:exposing job Store AIP Review
      INFO:amuser.jobstasks:expecting job Store AIP Review to be in group Store AIP
      WARNING:amuser.transferingest:Unable to find Transfer 02986424-9c4a-4636-9845-6a1f7126b2ef.

[Errno 2] No such file or directory: '/tmp/tmptawmtyr4'
[Errno 2] No such file or directory: '/tmp/tmpxc2kinph'
[Errno 2] No such file or directory: '/tmp/tmpnd52kj2z'
    And the user waits for the AIP to appear in archival storage                                                                                                        # None
    And the user downloads the AIP                                                                                                                                      # None
    And the user decompresses the AIP                                                                                                                                   # None
    Then the submissionDocumentation directory of the AIP contains a copy of the MediaConch policy file NYULib_MKVFFV1_MODIFIED.xml                                     # None
    And the logs directory of the AIP contains a MediaConch policy check output file for each policy file tested against NYULib_MKVFFV1_MODIFIED.xml                    # None


Failing scenarios:
  features/core/ingest-policy-check.feature:56  Isla has preservation derivatives and she needs to know whether they conform to her preservation policy -- @1.2 Policy Check Outcomes

8 features passed, 1 failed, 8 skipped, 3 untested
3 scenarios passed, 1 failed, 20 skipped, 28 untested
54 steps passed, 1 failed, 179 skipped, 0 undefined, 324 untested
Took 10m24.797s
Makefile:164: recipe for target 'test-at-behave' failed
make: *** [test-at-behave] Error 1

Third attempt: 👍

1 feature passed, 0 failed, 19 skipped
8 scenarios passed, 0 failed, 44 skipped
118 steps passed, 0 failed, 440 skipped, 0 undefined
Took 21m24.178s

Can maybe you or @ablwr flush your system, and give it a go first time around? See if it passes?

@sevein
Copy link
Member Author

sevein commented Oct 22, 2018

Can maybe you or @ablwr flush your system, and give it a go first time around? See if it passes?

@ross-spencer I've experienced that problem too but not as often. I suspect it's related to the new stack I'm using in Compose based on Marionette + WebDriver. Making the wait factor higher worked for Joel and me but even that way I've seen errors like yours a few times. On the other hand, it seems to work consistently the old way which we're planning to use in CI.

I filed a bug at some point: #125, I thought that wait_factor fixed it but not quite!

In addition to the `docker cp` and `scp` methods already available, this
commit includes the ability to access files like sample data when it's
simply available in the local filesystem.
@ross-spencer
Copy link
Contributor

@sevein I hope I'm not jumping the gun, but because I am on European time, I'll be signing off soon. It sounds like the changes are resolved? So LGTM! 👍

@sevein sevein merged commit 56b9e35 into master Oct 22, 2018
@sevein sevein deleted the dev/issue-193-amauat-am18x branch October 22, 2018 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants