Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

This directory contains automated end-to-end tests for Aerie.

## Getting Started
## Running

`AUTH_TYPE` must be set to `none` in order to run end-to-end tests.
A Docker stack with authorization disabled is available within this directory.
To spin up this stack run:

```sh
docker compose -f docker-compose-test.yml up
```

After starting the development Docker compose stack the following commands can be issued to run these tests:

```sh
npm install
npm test
npm install && npm test
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gov.nasa.jpl.aerie.merlin.protocol.types;

import java.util.Objects;
import java.util.Optional;

/**
Expand Down Expand Up @@ -27,15 +28,15 @@ public static RealDynamics linear(final double initial, final double rate) {
}


public final RealDynamics scaledBy(final double scalar) {
public RealDynamics scaledBy(final double scalar) {
return linear(this.initial * scalar, this.rate * scalar);
}

public final RealDynamics plus(final RealDynamics other) {
public RealDynamics plus(final RealDynamics other) {
return linear(this.initial + other.initial, this.rate + other.rate);
}

public final RealDynamics minus(final RealDynamics other) {
public RealDynamics minus(final RealDynamics other) {
return this.plus(other.scaledBy(-1.0));
}

Expand Down Expand Up @@ -94,15 +95,20 @@ public final RealDynamics minus(final RealDynamics other) {


@Override
public final String toString() {
public String toString() {
return "λt. " + this.initial + " + t * " + this.rate;
}

@Override
public final boolean equals(final Object o) {
public boolean equals(final Object o) {
if (!(o instanceof RealDynamics)) return false;
final var other = (RealDynamics) o;

return (this.initial == other.initial) && (this.rate == other.rate);
}

@Override
public int hashCode() {
return Objects.hash(initial, rate);
}
}
Loading