{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/comments/177067435","pull_request_review_id":106873910,"id":177067435,"diff_hunk":"@@ -0,0 +1,138 @@\n+/*\n+ * Copyright 2015-2016 Red Hat, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package io.fabric8.maven.docker.config;\n+\n+import org.apache.commons.lang3.SerializationUtils;\n+import org.junit.Assert;\n+import org.junit.Test;\n+\n+import java.io.*;\n+import java.util.Arrays;\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+public class RunImageConfigurationTest {\n+    private RunImageConfiguration runImageConfiguration;\n+\n+    @Test\n+    public void testEnv() {\n+        Map<String, String> envMap = new HashMap<>();\n+\n+        envMap.put(\"ADDR_TYPE_1\", \"${docker.container.consul.ip}:8500\");\n+        envMap.put(\"ADDR_TYPE_2\", \"+${docker.container.consul.ip}\");\n+\n+        runImageConfiguration = new RunImageConfiguration.Builder()\n+                .env(envMap)\n+                .build();\n+\n+        Assert.assertNotNull(runImageConfiguration);\n+        Assert.assertNotNull(runImageConfiguration.getEnv());\n+        Assert.assertEquals(\"${docker.container.consul.ip}:8500\", runImageConfiguration.getEnv().get(\"ADDR_TYPE_1\"));\n+        Assert.assertEquals(\"+${docker.container.consul.ip}\", runImageConfiguration.getEnv().get(\"ADDR_TYPE_2\"));\n+    }\n+\n+    @Test\n+    public void testNetworkingConfig() {\n+        runImageConfiguration = new RunImageConfiguration.Builder()\n+                .network(null)\n+                .build();\n+        Assert.assertNotNull(runImageConfiguration);\n+        Assert.assertNotNull(runImageConfiguration.getNetworkingConfig());\n+    }\n+\n+    @Test\n+    public void testSerialization() {","path":"src/test/java/io/fabric8/maven/docker/config/RunImageConfigurationTest.java","position":59,"original_position":59,"commit_id":"992ed245dab0dcf4f058e1930eef7fce0438608e","original_commit_id":"992ed245dab0dcf4f058e1930eef7fce0438608e","user":{"login":"rhuss","id":99080,"avatar_url":"https://avatars3.githubusercontent.com/u/99080?v=4","gravatar_id":"","url":"https://api.github.com/users/rhuss","html_url":"https://github.com/rhuss","followers_url":"https://api.github.com/users/rhuss/followers","following_url":"https://api.github.com/users/rhuss/following{/other_user}","gists_url":"https://api.github.com/users/rhuss/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuss/subscriptions","organizations_url":"https://api.github.com/users/rhuss/orgs","repos_url":"https://api.github.com/users/rhuss/repos","events_url":"https://api.github.com/users/rhuss/events{/privacy}","received_events_url":"https://api.github.com/users/rhuss/received_events","type":"User","site_admin":false},"body":"what is this test about ?","created_at":"2018-03-26T12:11:54Z","updated_at":"2018-03-26T12:13:30Z","html_url":"https://github.com/fabric8io/docker-maven-plugin/pull/964#discussion_r177067435","pull_request_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/comments/177067435"},"html":{"href":"https://github.com/fabric8io/docker-maven-plugin/pull/964#discussion_r177067435"},"pull_request":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964"}}},"pull_request":{"url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964","id":173168883,"html_url":"https://github.com/fabric8io/docker-maven-plugin/pull/964","diff_url":"https://github.com/fabric8io/docker-maven-plugin/pull/964.diff","patch_url":"https://github.com/fabric8io/docker-maven-plugin/pull/964.patch","issue_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/964","number":964,"state":"open","locked":false,"title":"Fixes #960 Property placeholders are not interpolated when they are only thing in XML","user":{"login":"rohanKanojia","id":13834498,"avatar_url":"https://avatars3.githubusercontent.com/u/13834498?v=4","gravatar_id":"","url":"https://api.github.com/users/rohanKanojia","html_url":"https://github.com/rohanKanojia","followers_url":"https://api.github.com/users/rohanKanojia/followers","following_url":"https://api.github.com/users/rohanKanojia/following{/other_user}","gists_url":"https://api.github.com/users/rohanKanojia/gists{/gist_id}","starred_url":"https://api.github.com/users/rohanKanojia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohanKanojia/subscriptions","organizations_url":"https://api.github.com/users/rohanKanojia/orgs","repos_url":"https://api.github.com/users/rohanKanojia/repos","events_url":"https://api.github.com/users/rohanKanojia/events{/privacy}","received_events_url":"https://api.github.com/users/rohanKanojia/received_events","type":"User","site_admin":false},"body":"Somehow these ${...} parameters are not being picked up by maven\r\nproperly when used solely without any suffix string literal, the maven\r\nparameter string comes off as NULL. So adding a workaround for this.\r\nWe'll use +${...} as a parameter which would be handled by dmp afterwards","created_at":"2018-03-06T14:11:40Z","updated_at":"2018-03-26T12:13:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3603e729b66558c1ad7be0a66edf4a1e01eedd2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964/commits","review_comments_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964/comments","review_comment_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/964/comments","statuses_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/statuses/992ed245dab0dcf4f058e1930eef7fce0438608e","head":{"label":"rohanKanojia:issue960","ref":"issue960","sha":"992ed245dab0dcf4f058e1930eef7fce0438608e","user":{"login":"rohanKanojia","id":13834498,"avatar_url":"https://avatars3.githubusercontent.com/u/13834498?v=4","gravatar_id":"","url":"https://api.github.com/users/rohanKanojia","html_url":"https://github.com/rohanKanojia","followers_url":"https://api.github.com/users/rohanKanojia/followers","following_url":"https://api.github.com/users/rohanKanojia/following{/other_user}","gists_url":"https://api.github.com/users/rohanKanojia/gists{/gist_id}","starred_url":"https://api.github.com/users/rohanKanojia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohanKanojia/subscriptions","organizations_url":"https://api.github.com/users/rohanKanojia/orgs","repos_url":"https://api.github.com/users/rohanKanojia/repos","events_url":"https://api.github.com/users/rohanKanojia/events{/privacy}","received_events_url":"https://api.github.com/users/rohanKanojia/received_events","type":"User","site_admin":false},"repo":{"id":115719059,"name":"docker-maven-plugin","full_name":"rohanKanojia/docker-maven-plugin","owner":{"login":"rohanKanojia","id":13834498,"avatar_url":"https://avatars3.githubusercontent.com/u/13834498?v=4","gravatar_id":"","url":"https://api.github.com/users/rohanKanojia","html_url":"https://github.com/rohanKanojia","followers_url":"https://api.github.com/users/rohanKanojia/followers","following_url":"https://api.github.com/users/rohanKanojia/following{/other_user}","gists_url":"https://api.github.com/users/rohanKanojia/gists{/gist_id}","starred_url":"https://api.github.com/users/rohanKanojia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohanKanojia/subscriptions","organizations_url":"https://api.github.com/users/rohanKanojia/orgs","repos_url":"https://api.github.com/users/rohanKanojia/repos","events_url":"https://api.github.com/users/rohanKanojia/events{/privacy}","received_events_url":"https://api.github.com/users/rohanKanojia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rohanKanojia/docker-maven-plugin","description":"Maven plugin for running and creating Docker images","fork":true,"url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin","forks_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/forks","keys_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/teams","hooks_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/events","assignees_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/tags","blobs_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/subscription","commits_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/merges","archive_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/downloads","issues_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/rohanKanojia/docker-maven-plugin/deployments","created_at":"2017-12-29T12:01:31Z","updated_at":"2017-12-29T12:01:34Z","pushed_at":"2018-03-13T16:14:49Z","git_url":"git://github.com/rohanKanojia/docker-maven-plugin.git","ssh_url":"git@github.com:rohanKanojia/docker-maven-plugin.git","clone_url":"https://github.com/rohanKanojia/docker-maven-plugin.git","svn_url":"https://github.com/rohanKanojia/docker-maven-plugin","homepage":"https://dmp.fabric8.io","size":14161,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fabric8io:master","ref":"master","sha":"73433ffb5f12e76cd53e217e1fecec69c8899a85","user":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars1.githubusercontent.com/u/6074349?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"repo":{"id":18128548,"name":"docker-maven-plugin","full_name":"fabric8io/docker-maven-plugin","owner":{"login":"fabric8io","id":6074349,"avatar_url":"https://avatars1.githubusercontent.com/u/6074349?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8io/docker-maven-plugin","description":"Maven plugin for running and creating Docker images","fork":false,"url":"https://api.github.com/repos/fabric8io/docker-maven-plugin","forks_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/forks","keys_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/teams","hooks_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/hooks","issue_events_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/events","assignees_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/tags","blobs_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/languages","stargazers_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/stargazers","contributors_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/contributors","subscribers_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/subscribers","subscription_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/subscription","commits_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/merges","archive_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/downloads","issues_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/labels{/name}","releases_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8io/docker-maven-plugin/deployments","created_at":"2014-03-26T06:10:05Z","updated_at":"2018-03-26T05:58:45Z","pushed_at":"2018-03-26T08:14:25Z","git_url":"git://github.com/fabric8io/docker-maven-plugin.git","ssh_url":"git@github.com:fabric8io/docker-maven-plugin.git","clone_url":"https://github.com/fabric8io/docker-maven-plugin.git","svn_url":"https://github.com/fabric8io/docker-maven-plugin","homepage":"https://dmp.fabric8.io","size":14497,"stargazers_count":800,"watchers_count":800,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"archived":false,"open_issues_count":265,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":334,"open_issues":265,"watchers":800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964"},"html":{"href":"https://github.com/fabric8io/docker-maven-plugin/pull/964"},"issue":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/964"},"comments":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/issues/964/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/pulls/964/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8io/docker-maven-plugin/statuses/992ed245dab0dcf4f058e1930eef7fce0438608e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rhuss"}}