fix: save id as blob, not as string
add: some progress to new discovery add: some tests remove: migrations. restarting for now
This commit is contained in:
		
							parent
							
								
									b4eec336a2
								
							
						
					
					
						commit
						51ab1d7982
					
				
					 22 changed files with 345 additions and 121 deletions
				
			
		
							
								
								
									
										25
									
								
								tavern_tests/test_get_all.tavern.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								tavern_tests/test_get_all.tavern.yaml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
test_name: Test basic get all requests
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
    - name: Get all schedules
 | 
			
		||||
      request:
 | 
			
		||||
          url: "http://localhost:5000/api/v1/schedules/"
 | 
			
		||||
          method: GET
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
    - name: Get all relays
 | 
			
		||||
      request:
 | 
			
		||||
          url: "http://localhost:5000/api/v1/relays/"
 | 
			
		||||
          method: GET
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
    - name: Get all controllers
 | 
			
		||||
      request:
 | 
			
		||||
          url: "http://localhost:5000/api/v1/controllers/"
 | 
			
		||||
          method: GET
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
| 
						 | 
				
			
			@ -1,9 +0,0 @@
 | 
			
		|||
test_name: Test basic requests
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
  - name: Make sure we get any response
 | 
			
		||||
    request:
 | 
			
		||||
      url: http://localhost:5000/api/v1/schedules/
 | 
			
		||||
      method: GET
 | 
			
		||||
    response:
 | 
			
		||||
      status_code: 200
 | 
			
		||||
							
								
								
									
										39
									
								
								tavern_tests/test_schedules_basic.tavern.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								tavern_tests/test_schedules_basic.tavern.yaml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,39 @@
 | 
			
		|||
test_name: Test basic requests
 | 
			
		||||
 | 
			
		||||
stages:
 | 
			
		||||
    - name: Make sure we get any response
 | 
			
		||||
      request:
 | 
			
		||||
          url: "http://localhost:5000/api/v1/schedules/"
 | 
			
		||||
          method: GET
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
    - name: post schedule, expect it to be echoed back
 | 
			
		||||
      request:
 | 
			
		||||
          method: POST
 | 
			
		||||
          url: "http://localhost:5000/api/v1/schedules/"
 | 
			
		||||
          json:
 | 
			
		||||
              name: "hello"
 | 
			
		||||
              periods:
 | 
			
		||||
                - start: '00:10'
 | 
			
		||||
                  end: '00:20'
 | 
			
		||||
                - start: '00:30'
 | 
			
		||||
                  end: '00:40'
 | 
			
		||||
                - start: '00:50'
 | 
			
		||||
                  end: '01:00'
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
          body:
 | 
			
		||||
              name: "{tavern.request_vars.json.name}"
 | 
			
		||||
          save:
 | 
			
		||||
              body:
 | 
			
		||||
                  returned_name: name
 | 
			
		||||
                  returned_id: id
 | 
			
		||||
    - name: get schedule, check name and some periods
 | 
			
		||||
      request:
 | 
			
		||||
          method: GET
 | 
			
		||||
          url: "http://localhost:5000/api/v1/schedules/{returned_id}"
 | 
			
		||||
      response:
 | 
			
		||||
          status_code: 200
 | 
			
		||||
          body:
 | 
			
		||||
              name: "{returned_name}"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue