This file contains hidden or 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
public void testSendError() throws Exception { | |
// first advice the route to replace the input, and catch sending to FTP servers | |
context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() { | |
@Override | |
public void configure() throws Exception { | |
replaceFromWith("direct:input); | |
// intercept valid messages | |
interceptSendToEndpoint("ftp://hostname/valid") | |
.skipSendToOriginalEndpoint() |
This file contains hidden or 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
import junit.extensions.ActiveTestSuite; | |
import junit.extensions.RepeatedTest; | |
import junit.framework.JUnit4TestAdapter; | |
import junit.framework.Test; | |
import junit.framework.TestCase; | |
import junit.framework.TestSuite; | |
public class ConcurrentTestSample extends TestCase { | |
public static Test suite() { |
This file contains hidden or 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
Feature: API | |
In order to use the service from third party apps | |
As a user | |
I want to be able to use an API | |
Background: | |
Given a user exists # Pickle | |
And I login as the user using basic auth | |
Scenario Outline: Get a ticket |
This file contains hidden or 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
var returnData = { | |
pageNumber: 3, | |
summaryList: [ { id: 5, name: 'name1'}, { id: 6, name: 'name2'} ] | |
}; | |
JobSummary = Backbone.Model.extend({}); | |
JobSummaryList = Backbone.Collection.extend({ | |
model: JobSummary | |
}); |
This file contains hidden or 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
package stub; | |
import com.github.dreamhead.moco.HttpServer; | |
import com.github.dreamhead.moco.Runner; | |
import com.github.dreamhead.moco.monitor.Slf4jMonitor; | |
import lombok.Delegate; | |
import org.junit.rules.TestWatcher; | |
import org.junit.runner.Description; | |
import static com.github.dreamhead.moco.Moco.httpserver; |
This file contains hidden or 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
h2:before { | |
display: block; | |
content: " "; | |
margin-top: -285px; | |
height: 285px; | |
visibility: hidden; | |
} |
This file contains hidden or 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
#!/bin/bash | |
set -o errexit # Exit on simple commands that return non-zero status. | |
set -o errtrace # Makes shell functions, command substitutions, and | |
# commands in subshells inherit traps on ERR | |
set -o nounset # Exit on use of unset variables. | |
run_test() { | |
TEST=$1 | |
TEST_PREFIX=`echo $TEST | cut -d'_' -f1` |
This file contains hidden or 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
prev_state = "absent" | |
if os.path.isdir(dest): | |
dest = dest + "/" + artifact_id + "-" + version + "." + extension | |
if os.path.lexists(dest): | |
if not artifact.is_snapshot(): | |
prev_state = "present" | |
elif downloader.verify_md5(dest, downloader.find_uri_for_artifact(artifact) + '.md5'): | |
prev_state = "present" | |
else: | |
path = os.path.dirname(dest) |
This file contains hidden or 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
sudo su - postgres | |
createdb mydb | |
psql -s mydb | |
create user someuser password 'somepassword'; | |
GRANT ALL PRIVILEGES ON DATABASE mydb TO someuser; |
This file contains hidden or 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
# Be sure to save your config files. Optional but I do: | |
sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
# Package repo (for apt-get) | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
# Also probably optional but I like to update sources and upgrade | |
sudo apt-get update |
OlderNewer