Skip to content

Commit

Permalink
Gabriel Barberini updated infinity-api-postman-collection
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Sep 23, 2023
1 parent 560a8b4 commit 2cfdd29
Showing 1 changed file with 10 additions and 79 deletions.
89 changes: 10 additions & 79 deletions test/infinity-api-postman-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,83 +953,14 @@
"// reduce environment date for future assertion",
"flightRequest.environment.date = flightRequest.environment.date.substring(0, flightRequest.environment.date.length - 7);",
"",
"// save flight parameters",
"pm.environment.set('flight_id', apiRspn.new_flight_id) ",
"pm.environment.set('rail_length', flightRequest.rail_length) ",
"pm.environment.set('inclination', flightRequest.inclination)",
"pm.environment.set('heading', flightRequest.heading)",
"",
"// flight environment",
"pm.environment.set('latitude', flightRequest.environment.latitude)",
"pm.environment.set('longitude', flightRequest.environment.longitude)",
"pm.environment.set('elevation', flightRequest.environment.elevation) ",
"pm.environment.set('atmospheric_model_type', flightRequest.environment.atmospheric_model_type) ",
"pm.environment.set('atmospheric_model_file', flightRequest.environment.atmospheric_model_file) ",
"pm.environment.set('date', flightRequest.environment.date) ",
"",
"// flight rocket",
"pm.environment.set('radius', flightRequest.rocket.radius)",
"pm.environment.set('mass', flightRequest.rocket.mass)",
"pm.environment.set('inertia', flightRequest.rocket.inertia)",
"pm.environment.set('power_off_drag', flightRequest.rocket.power_off_drag)",
"pm.environment.set('power_on_drag', flightRequest.rocket.power_on_drag)",
"pm.environment.set('center_of_mass_without_motor', flightRequest.rocket.center_of_mass_without_motor)",
"pm.environment.set('motor_position', flightRequest.rocket.motor_position)",
"pm.environment.set('rail_buttons', flightRequest.rocket.rail_buttons)",
"pm.environment.set('upper_button_position', flightRequest.rocket.rail_buttons.upper_button_position)",
"pm.environment.set('lower_button_position', flightRequest.rocket.rail_buttons.lower_button_position)",
"pm.environment.set('angular_position', flightRequest.rocket.rail_buttons.angular_position)",
"pm.environment.set('rocket_coordinate_system_orientation', flightRequest.rocket.coordinate_system_orientation)",
"",
"// flight rocket motor",
"pm.environment.set('burn_time', flightRequest.rocket.motor.burn_time)",
"pm.environment.set('dry_mass', flightRequest.rocket.motor.dry_mass)",
"pm.environment.set('dry_inertia', flightRequest.rocket.motor.dry_inertia)",
"pm.environment.set('center_of_dry_mass_position', flightRequest.rocket.motor.center_of_dry_mass_position)",
"pm.environment.set('grain_number', flightRequest.rocket.motor.grain_number)",
"pm.environment.set('grain_density', flightRequest.rocket.motor.grain_density)",
"pm.environment.set('grain_outer_radius', flightRequest.rocket.motor.grain_outer_radius)",
"pm.environment.set('grain_initial_inner_radius', flightRequest.rocket.motor.grain_initial_inner_radius)",
"pm.environment.set('grain_initial_height', flightRequest.rocket.motor.grain_initial_height)",
"pm.environment.set('grains_center_of_mass_position', flightRequest.rocket.motor.grains_center_of_mass_position)",
"pm.environment.set('grain_separation', flightRequest.rocket.motor.grain_separation)",
"pm.environment.set('thrust_source', flightRequest.rocket.motor.thrust_source)",
"pm.environment.set('nozzle_radius', flightRequest.rocket.motor.nozzle_radius)",
"pm.environment.set('throat_radius', flightRequest.rocket.motor.throat_radius)",
"pm.environment.set('interpolation_method', flightRequest.rocket.motor.interpolation_method)",
"pm.environment.set('motor_coordinate_system_orientation', flightRequest.rocket.motor.coordinate_system_orientation)",
"",
"// flight rocket nose",
"pm.environment.set('nose_length', flightRequest.rocket.nose.length)",
"pm.environment.set('kind', flightRequest.rocket.nose.kind)",
"pm.environment.set('nose_position', flightRequest.rocket.nose.position)",
"pm.environment.set('base_radius', flightRequest.rocket.nose.base_radius)",
"pm.environment.set('rocket_radius', flightRequest.rocket.nose.rocket_radius)",
"",
"// flight rocket fins",
"pm.environment.set('n', flightRequest.rocket.fins.n)",
"pm.environment.set('root_chord', flightRequest.rocket.fins.root_chord)",
"pm.environment.set('tip_chord', flightRequest.rocket.fins.tip_chord)",
"pm.environment.set('span', flightRequest.rocket.fins.span)",
"pm.environment.set('fin_position', flightRequest.rocket.fins.position)",
"pm.environment.set('cant_angle', flightRequest.rocket.fins.cant_angle)",
"pm.environment.set('fin_radius', flightRequest.rocket.fins.radius)",
"pm.environment.set('airfoil', flightRequest.rocket.fins.airfoil)",
"",
"// flight rocket tail",
"pm.environment.set('top_radius', flightRequest.rocket.tail.top_radius)",
"pm.environment.set('bottom_radius', flightRequest.rocket.tail.bottom_radius)",
"pm.environment.set('tail_length', flightRequest.rocket.tail.length)",
"pm.environment.set('tail_position', flightRequest.rocket.tail.position)",
"pm.environment.set('tail_radius', flightRequest.rocket.tail.radius)",
"",
"// flight rocket parachute",
"pm.environment.set('parachutes_names', flightRequest.rocket.parachutes.name)",
"pm.environment.set('parachutes_cds', flightRequest.rocket.parachutes.cd_s)",
"pm.environment.set('parachutes_sampling_rate', flightRequest.rocket.parachutes.sampling_rate)",
"pm.environment.set('parachutes_lags', flightRequest.rocket.parachutes.lag)",
"pm.environment.set('parachutes_noises', flightRequest.rocket.parachutes.noise)",
"pm.environment.set('parachutes_triggers', flightRequest.rocket.parachutes.triggers)",
"// save environment parameters",
"pm.environment.set('env_id', apiRspn.new_env_id) ",
"pm.environment.set('latitude', flightRequest.latitude)",
"pm.environment.set('longitude', flightRequest.longitude)",
"pm.environment.set('elevation', flightRequest.elevation) ",
"pm.environment.set('atmospheric_model_type', flightRequest.atmospheric_model_type) ",
"pm.environment.set('atmospheric_model_file', flightRequest.atmospheric_model_file) ",
"pm.environment.set('date', flightRequest.date) ",
"",
"//TEST",
"bdd = \"Given a valid Flight PUT request is made to the API\";",
Expand Down Expand Up @@ -1066,14 +997,14 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"rail_length\": 5.2,\n \"inclination\": 85,\n \"heading\": 0,\n \"environment\": {\n \"latitude\": 0,\n \"longitude\": 0,\n \"elevation\": 1405,\n \"atmospheric_model_type\": \"standard_atmosphere\",\n \"atmospheric_model_file\": \"GFS\",\n \"date\": \"2023-05-09T16:30:50.065992\"\n },\n \"rocket\": {\n \"radius\": 0.0632,\n \"mass\": 16.235,\n \"inertia\": [\n 6.321, \n 6.321, \n 0.0346\n ],\n \"power_off_drag\": \"lib/data/calisto/powerOffDragCurve.csv\",\n \"power_on_drag\": \"lib/data/calisto/powerOnDragCurve.csv\",\n \"center_of_mass_without_motor\": 0,\n \"coordinate_system_orientation\": \"tail_to_nose\",\n \"motor_position\": -1.255,\n \"rail_buttons\": {\n \"upper_button_position\": -0.5,\n \"lower_button_position\": 0.2,\n \"angular_position\": 45\n },\n \"motor\": {\n \"burn_time\": 3.9,\n \"dry_mass\": 1.815,\n \"dry_inertia\": [0.125, 0.125, 0.002],\n \"center_of_dry_mass_position\": 0.317,\n \"grain_number\": 5,\n \"grain_density\": 1815,\n \"grain_outer_radius\": 0.033,\n \"grain_initial_inner_radius\": 0.015,\n \"grain_initial_height\": 0.12,\n \"grains_center_of_mass_position\": -0.85704,\n \"grain_separation\": 0.005,\n \"thrust_source\": \"lib/data/motors/Cesaroni_M1670.eng\", \n \"nozzle_radius\": 0.033,\n \"throat_radius\": 0.011,\n \"interpolation_method\": \"linear\",\n \"coordinate_system_orientation\": \"nozzle_to_combustion_chamber\"\n },\n \"nose\": {\n \"length\": 0.55829,\n \"kind\": \"vonKarman\",\n \"position\": 1.278,\n \"base_radius\": 0.0635,\n \"rocket_radius\": 0.0635\n },\n \"fins\": {\n \"n\": 4,\n \"root_chord\": 0.12,\n \"tip_chord\": 0.04,\n \"span\": 0.1,\n \"position\": -1.04956,\n \"cant_angle\": 0,\n \"radius\": 0.0635,\n \"airfoil\": \"\"\n },\n \"tail\": {\n \"top_radius\": 0.0635,\n \"bottom_radius\": 0.0435,\n \"length\": 0.06,\n \"position\": -1.194656,\n \"radius\": 0.0635\n },\n \"parachutes\": {\n \"name\": [\n \"Main\",\n \"Drogue\"\n ],\n \"cd_s\": [\n 10,\n 1\n ],\n \"sampling_rate\": [\n 105,\n 105\n ],\n \"lag\": [\n 1.5,\n 1.5\n ],\n \"noise\": [\n [\n 0,\n 8.3,\n 0.5\n ],\n [\n 0,\n 8.3,\n 0.5\n ]\n ],\n \"triggers\": [\n \"lambda p, h, y: y[5] < 0 and h < 800\",\n \"lambda p, h, y: y[5] < 0\"\n ]\n }\n } \n}",
"raw": "{\n \"latitude\": 0,\n \"longitude\": 0,\n \"elevation\": 1400,\n \"atmospheric_model_type\": \"standard_atmosphere\",\n \"atmospheric_model_file\": \"GFS\",\n \"date\": \"2023-05-09T16:30:50.065992\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": "{{endpoint}}/flights/{{flight_id}}",
"url": "{{endpoint}}/flights/{{flight_id}}/env",
"description": "This returns a `token` that you can use to retrieve information later on.\n\nWe have included a test to confirm if a token is returned. We have also added test scripts to copy the token to the `token` collection variable. This makes it easy for us to reuse this token in other requests in the collection."
},
"response": []
Expand Down

0 comments on commit 2cfdd29

Please sign in to comment.