-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make job log directory location be configurable in opencue.properties (…
…#223) * make job log directory location be configurable in opencue.properties * adding tests for getting job logs
- Loading branch information
Greg Denton
authored
Feb 27, 2019
1 parent
cef1484
commit 97a2054
Showing
3 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
cuebot/src/test/java/com/imageworks/spcue/test/util/JobLogUtilTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2018 Sony Pictures Imageworks Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
|
||
package com.imageworks.spcue.test.util; | ||
|
||
import junit.framework.TestCase; | ||
import org.junit.Before; | ||
|
||
import com.imageworks.spcue.JobDetail; | ||
import com.imageworks.spcue.util.JobLogUtil; | ||
|
||
public class JobLogUtilTests extends TestCase { | ||
|
||
@Before | ||
public void setUp() { | ||
JobLogUtil.jobLogRootDir = "/shots"; | ||
} | ||
|
||
public void testGetJobLogRootDir() { | ||
assertEquals(JobLogUtil.getJobLogRootDir(), "/shots"); | ||
} | ||
|
||
public void testGetJobLogDir() { | ||
assertEquals(JobLogUtil.getJobLogDir("show", "shot"), "/shots/show/shot/logs"); | ||
} | ||
|
||
public void testGetJobLogPath() { | ||
JobDetail jobDetail = new JobDetail(); | ||
jobDetail.id = "id"; | ||
jobDetail.name = "name"; | ||
jobDetail.showName = "show"; | ||
jobDetail.shot = "shot"; | ||
assertEquals(JobLogUtil.getJobLogPath(jobDetail), "/shots/show/shot/logs/name--id"); | ||
} | ||
} | ||
|