code: def test_schema_validation():
      test = VALID_TEST.copy()
  
      schema = load_schema_file()
  
      assert not validate_test(test, schema)
  
      # Remove some optional arguments
      del test["alert"]
      del test["python"]
      del test["run"]["wait_for_nodes"]
      del test["cluster"]["autosuspend_mins"]
  
      assert not validate_test(test, schema)
  
      # Add some faulty arguments
  
      # Faulty frequency
      invalid_test = test.copy()
      invalid_test["frequency"] = "invalid"
  
      assert validate_test(invalid_test, schema)
  
      # Faulty job type
      invalid_test = test.copy()
      invalid_test["run"]["type"] = "invalid"
  
      assert validate_test(invalid_test, schema)
  
      # Faulty file manager type
      invalid_test = test.copy()
      invalid_test["run"]["file_manager"] = "invalid"
  
      assert validate_test(invalid_test, schema)
  
      # Faulty smoke test
      invalid_test = test.copy()
      del invalid_test["smoke_test"]["frequency"]
  
      assert validate_test(invalid_test, schema)
  
      # Faulty Python version
      invalid_test = test.copy()
      invalid_test["python"] = "invalid"
  
      assert validate_test(invalid_test, schema)
  
file_path: ray/release/ray_release/tests/test_config.py
imports: import sys
  import yaml
  import pytest
  from ray_release.test import Test
  from ray_release.config import read_and_validate_release_test_collection, validate_cluster_compute, load_schema_file, parse_test_definition, validate_test
  from ray_release.exception import ReleaseTestConfigError
label_desc: Use image node_id 2 for calling a global function with example usage: test_schema_validation() without return types