{"action":"created","comment":{"url":"https://api.github.com/repos/docker-library/official-images/pulls/comments/38881486","id":38881486,"diff_hunk":"@@ -47,13 +49,51 @@ if [ $# -eq 0 ]; then\n \texit 1\n fi\n \n-# load config lists\n-# contains:\n-#   globalTests\n-#   testAlias\n-#   imageTests\n-#   globalExcludeTests\n-. \"$dir/config.sh\"\n+# declare configuration variables\n+declare -a globalTests=()\n+declare -A testAlias=()\n+declare -A imageTests=()\n+declare -A globalExcludeTests=()\n+\n+# if there are no user-specified configs, use the default config\n+if [ ${#configs} -eq 0 ]; then\n+\tconfigs+=(\"$dir/config.sh\")\n+fi\n+\n+# load the configs\n+declare -A testPaths=()\n+for conf in \"${configs[@]}\"; do\n+\t. \"$conf\"\n+\n+\t# Determine the full path to any newly-declared tests\n+\tconfDir=\"$(dirname \"$conf\")\"\n+\n+\tfor testName in ${globalTests[@]}; do\n+\t\t[ \"${testPaths[$testName]}\" ] && continue\n+\n+\t\tif [ -d \"$confDir/tests/$testName\" ]; then\n+\t\t\t# Test directory found relative to the conf file\n+\t\t\ttestPaths[$testName]=\"$confDir/tests/$testName\"\n+\t\telif [ -d \"$dir/tests/$testName\" ]; then\n+\t\t\t# Test directory found in the main tests/ directory\n+\t\t\ttestPaths[$testName]=\"$dir/tests/$testName\"\n+\t\tfi","path":"test/run.sh","position":60,"original_position":60,"commit_id":"5450bc4f820066dde6ff763bbb65425a9b52c62d","original_commit_id":"5450bc4f820066dde6ff763bbb65425a9b52c62d","user":{"login":"yosifkit","id":896423,"avatar_url":"https://avatars.githubusercontent.com/u/896423?v=3","gravatar_id":"","url":"https://api.github.com/users/yosifkit","html_url":"https://github.com/yosifkit","followers_url":"https://api.github.com/users/yosifkit/followers","following_url":"https://api.github.com/users/yosifkit/following{/other_user}","gists_url":"https://api.github.com/users/yosifkit/gists{/gist_id}","starred_url":"https://api.github.com/users/yosifkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosifkit/subscriptions","organizations_url":"https://api.github.com/users/yosifkit/orgs","repos_url":"https://api.github.com/users/yosifkit/repos","events_url":"https://api.github.com/users/yosifkit/events{/privacy}","received_events_url":"https://api.github.com/users/yosifkit/received_events","type":"User","site_admin":false},"body":"Maybe an `else` block to warn the user that a test was not found. Or maybe it just comes out when the tests are run?","created_at":"2015-09-07T22:46:27Z","updated_at":"2015-09-07T22:46:27Z","html_url":"https://github.com/docker-library/official-images/pull/1015#discussion_r38881486","pull_request_url":"https://api.github.com/repos/docker-library/official-images/pulls/1015","_links":{"self":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/comments/38881486"},"html":{"href":"https://github.com/docker-library/official-images/pull/1015#discussion_r38881486"},"pull_request":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/1015"}}},"pull_request":{"url":"https://api.github.com/repos/docker-library/official-images/pulls/1015","id":43833854,"html_url":"https://github.com/docker-library/official-images/pull/1015","diff_url":"https://github.com/docker-library/official-images/pull/1015.diff","patch_url":"https://github.com/docker-library/official-images/pull/1015.patch","issue_url":"https://api.github.com/repos/docker-library/official-images/issues/1015","number":1015,"state":"open","locked":false,"title":"Support user-specified test config scripts","user":{"login":"md5","id":76367,"avatar_url":"https://avatars.githubusercontent.com/u/76367?v=3","gravatar_id":"","url":"https://api.github.com/users/md5","html_url":"https://github.com/md5","followers_url":"https://api.github.com/users/md5/followers","following_url":"https://api.github.com/users/md5/following{/other_user}","gists_url":"https://api.github.com/users/md5/gists{/gist_id}","starred_url":"https://api.github.com/users/md5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/md5/subscriptions","organizations_url":"https://api.github.com/users/md5/orgs","repos_url":"https://api.github.com/users/md5/repos","events_url":"https://api.github.com/users/md5/events{/privacy}","received_events_url":"https://api.github.com/users/md5/received_events","type":"User","site_admin":false},"body":"This makes it easier to use tests in this repository for images other than official ones.","created_at":"2015-09-01T03:24:58Z","updated_at":"2015-09-07T22:46:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89ebc3e6315e774ea58db631b0e833e5fa0ad957","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker-library/official-images/pulls/1015/commits","review_comments_url":"https://api.github.com/repos/docker-library/official-images/pulls/1015/comments","review_comment_url":"https://api.github.com/repos/docker-library/official-images/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker-library/official-images/issues/1015/comments","statuses_url":"https://api.github.com/repos/docker-library/official-images/statuses/5450bc4f820066dde6ff763bbb65425a9b52c62d","head":{"label":"appropriate:additional-test-config","ref":"additional-test-config","sha":"5450bc4f820066dde6ff763bbb65425a9b52c62d","user":{"login":"appropriate","id":11153133,"avatar_url":"https://avatars.githubusercontent.com/u/11153133?v=3","gravatar_id":"","url":"https://api.github.com/users/appropriate","html_url":"https://github.com/appropriate","followers_url":"https://api.github.com/users/appropriate/followers","following_url":"https://api.github.com/users/appropriate/following{/other_user}","gists_url":"https://api.github.com/users/appropriate/gists{/gist_id}","starred_url":"https://api.github.com/users/appropriate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appropriate/subscriptions","organizations_url":"https://api.github.com/users/appropriate/orgs","repos_url":"https://api.github.com/users/appropriate/repos","events_url":"https://api.github.com/users/appropriate/events{/privacy}","received_events_url":"https://api.github.com/users/appropriate/received_events","type":"Organization","site_admin":false},"repo":{"id":30402517,"name":"docker-library-official-images","full_name":"appropriate/docker-library-official-images","owner":{"login":"appropriate","id":11153133,"avatar_url":"https://avatars.githubusercontent.com/u/11153133?v=3","gravatar_id":"","url":"https://api.github.com/users/appropriate","html_url":"https://github.com/appropriate","followers_url":"https://api.github.com/users/appropriate/followers","following_url":"https://api.github.com/users/appropriate/following{/other_user}","gists_url":"https://api.github.com/users/appropriate/gists{/gist_id}","starred_url":"https://api.github.com/users/appropriate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appropriate/subscriptions","organizations_url":"https://api.github.com/users/appropriate/orgs","repos_url":"https://api.github.com/users/appropriate/repos","events_url":"https://api.github.com/users/appropriate/events{/privacy}","received_events_url":"https://api.github.com/users/appropriate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appropriate/docker-library-official-images","description":"","fork":true,"url":"https://api.github.com/repos/appropriate/docker-library-official-images","forks_url":"https://api.github.com/repos/appropriate/docker-library-official-images/forks","keys_url":"https://api.github.com/repos/appropriate/docker-library-official-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appropriate/docker-library-official-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appropriate/docker-library-official-images/teams","hooks_url":"https://api.github.com/repos/appropriate/docker-library-official-images/hooks","issue_events_url":"https://api.github.com/repos/appropriate/docker-library-official-images/issues/events{/number}","events_url":"https://api.github.com/repos/appropriate/docker-library-official-images/events","assignees_url":"https://api.github.com/repos/appropriate/docker-library-official-images/assignees{/user}","branches_url":"https://api.github.com/repos/appropriate/docker-library-official-images/branches{/branch}","tags_url":"https://api.github.com/repos/appropriate/docker-library-official-images/tags","blobs_url":"https://api.github.com/repos/appropriate/docker-library-official-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appropriate/docker-library-official-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appropriate/docker-library-official-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/appropriate/docker-library-official-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appropriate/docker-library-official-images/statuses/{sha}","languages_url":"https://api.github.com/repos/appropriate/docker-library-official-images/languages","stargazers_url":"https://api.github.com/repos/appropriate/docker-library-official-images/stargazers","contributors_url":"https://api.github.com/repos/appropriate/docker-library-official-images/contributors","subscribers_url":"https://api.github.com/repos/appropriate/docker-library-official-images/subscribers","subscription_url":"https://api.github.com/repos/appropriate/docker-library-official-images/subscription","commits_url":"https://api.github.com/repos/appropriate/docker-library-official-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/appropriate/docker-library-official-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/appropriate/docker-library-official-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/appropriate/docker-library-official-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/appropriate/docker-library-official-images/contents/{+path}","compare_url":"https://api.github.com/repos/appropriate/docker-library-official-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appropriate/docker-library-official-images/merges","archive_url":"https://api.github.com/repos/appropriate/docker-library-official-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appropriate/docker-library-official-images/downloads","issues_url":"https://api.github.com/repos/appropriate/docker-library-official-images/issues{/number}","pulls_url":"https://api.github.com/repos/appropriate/docker-library-official-images/pulls{/number}","milestones_url":"https://api.github.com/repos/appropriate/docker-library-official-images/milestones{/number}","notifications_url":"https://api.github.com/repos/appropriate/docker-library-official-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appropriate/docker-library-official-images/labels{/name}","releases_url":"https://api.github.com/repos/appropriate/docker-library-official-images/releases{/id}","created_at":"2015-02-06T08:28:05Z","updated_at":"2015-07-16T23:46:04Z","pushed_at":"2015-09-07T00:24:55Z","git_url":"git://github.com/appropriate/docker-library-official-images.git","ssh_url":"git@github.com:appropriate/docker-library-official-images.git","clone_url":"https://github.com/appropriate/docker-library-official-images.git","svn_url":"https://github.com/appropriate/docker-library-official-images","homepage":"","size":1288,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker-library:master","ref":"master","sha":"451f2a742499a21f520d04cc42a1029f547ea51a","user":{"login":"docker-library","id":7739233,"avatar_url":"https://avatars.githubusercontent.com/u/7739233?v=3","gravatar_id":"","url":"https://api.github.com/users/docker-library","html_url":"https://github.com/docker-library","followers_url":"https://api.github.com/users/docker-library/followers","following_url":"https://api.github.com/users/docker-library/following{/other_user}","gists_url":"https://api.github.com/users/docker-library/gists{/gist_id}","starred_url":"https://api.github.com/users/docker-library/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker-library/subscriptions","organizations_url":"https://api.github.com/users/docker-library/orgs","repos_url":"https://api.github.com/users/docker-library/repos","events_url":"https://api.github.com/users/docker-library/events{/privacy}","received_events_url":"https://api.github.com/users/docker-library/received_events","type":"Organization","site_admin":false},"repo":{"id":13655949,"name":"official-images","full_name":"docker-library/official-images","owner":{"login":"docker-library","id":7739233,"avatar_url":"https://avatars.githubusercontent.com/u/7739233?v=3","gravatar_id":"","url":"https://api.github.com/users/docker-library","html_url":"https://github.com/docker-library","followers_url":"https://api.github.com/users/docker-library/followers","following_url":"https://api.github.com/users/docker-library/following{/other_user}","gists_url":"https://api.github.com/users/docker-library/gists{/gist_id}","starred_url":"https://api.github.com/users/docker-library/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker-library/subscriptions","organizations_url":"https://api.github.com/users/docker-library/orgs","repos_url":"https://api.github.com/users/docker-library/repos","events_url":"https://api.github.com/users/docker-library/events{/privacy}","received_events_url":"https://api.github.com/users/docker-library/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker-library/official-images","description":"","fork":false,"url":"https://api.github.com/repos/docker-library/official-images","forks_url":"https://api.github.com/repos/docker-library/official-images/forks","keys_url":"https://api.github.com/repos/docker-library/official-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker-library/official-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker-library/official-images/teams","hooks_url":"https://api.github.com/repos/docker-library/official-images/hooks","issue_events_url":"https://api.github.com/repos/docker-library/official-images/issues/events{/number}","events_url":"https://api.github.com/repos/docker-library/official-images/events","assignees_url":"https://api.github.com/repos/docker-library/official-images/assignees{/user}","branches_url":"https://api.github.com/repos/docker-library/official-images/branches{/branch}","tags_url":"https://api.github.com/repos/docker-library/official-images/tags","blobs_url":"https://api.github.com/repos/docker-library/official-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker-library/official-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker-library/official-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker-library/official-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker-library/official-images/statuses/{sha}","languages_url":"https://api.github.com/repos/docker-library/official-images/languages","stargazers_url":"https://api.github.com/repos/docker-library/official-images/stargazers","contributors_url":"https://api.github.com/repos/docker-library/official-images/contributors","subscribers_url":"https://api.github.com/repos/docker-library/official-images/subscribers","subscription_url":"https://api.github.com/repos/docker-library/official-images/subscription","commits_url":"https://api.github.com/repos/docker-library/official-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker-library/official-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker-library/official-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker-library/official-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker-library/official-images/contents/{+path}","compare_url":"https://api.github.com/repos/docker-library/official-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker-library/official-images/merges","archive_url":"https://api.github.com/repos/docker-library/official-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker-library/official-images/downloads","issues_url":"https://api.github.com/repos/docker-library/official-images/issues{/number}","pulls_url":"https://api.github.com/repos/docker-library/official-images/pulls{/number}","milestones_url":"https://api.github.com/repos/docker-library/official-images/milestones{/number}","notifications_url":"https://api.github.com/repos/docker-library/official-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker-library/official-images/labels{/name}","releases_url":"https://api.github.com/repos/docker-library/official-images/releases{/id}","created_at":"2013-10-17T17:27:12Z","updated_at":"2015-09-07T16:33:52Z","pushed_at":"2015-09-07T20:46:03Z","git_url":"git://github.com/docker-library/official-images.git","ssh_url":"git@github.com:docker-library/official-images.git","clone_url":"https://github.com/docker-library/official-images.git","svn_url":"https://github.com/docker-library/official-images","homepage":"https://registry.hub.docker.com/repos/library/?s=stars","size":5802,"stargazers_count":765,"watchers_count":765,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":260,"mirror_url":null,"open_issues_count":60,"forks":260,"open_issues":60,"watchers":765,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/1015"},"html":{"href":"https://github.com/docker-library/official-images/pull/1015"},"issue":{"href":"https://api.github.com/repos/docker-library/official-images/issues/1015"},"comments":{"href":"https://api.github.com/repos/docker-library/official-images/issues/1015/comments"},"review_comments":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/1015/comments"},"review_comment":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker-library/official-images/pulls/1015/commits"},"statuses":{"href":"https://api.github.com/repos/docker-library/official-images/statuses/5450bc4f820066dde6ff763bbb65425a9b52c62d"}}}}